-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Language translations finder and update #7896
Conversation
Tests failed. There were 3 failures:
1) CodeIgniter\Commands\Translation\LocalizationFinderTest::testUpdateDefaultLocale
Failed asserting that two arrays are identical.
--- Expected
+++ Actual
@@ @@
'DESCRIPTION' => 'TranslationOne.DESCRIPTION'
'subTitle' => 'TranslationOne.subTitle'
'overflow_style' => 'TranslationOne.overflow_style'
- 'last_operation_success' => 'TranslationOne.last_operation_success'
'metaTags' => 'TranslationOne.metaTags'
'Copyright' => 'TranslationOne.Copyright'
+ 'last_operation_success' => 'TranslationOne.last_operation_success'
)
/home/runner/work/CodeIgniter4/CodeIgniter4/tests/system/Commands/Translation/LocalizationFinderTest.php:202
/home/runner/work/CodeIgniter4/CodeIgniter4/tests/system/Commands/Translation/LocalizationFinderTest.php:46
phpvfscomposer:///home/runner/work/CodeIgniter4/CodeIgniter4/vendor/phpunit/phpunit/phpunit:106
2) CodeIgniter\Commands\Translation\LocalizationFinderTest::testUpdateWithLocaleOption
Failed asserting that two arrays are identical.
--- Expected
+++ Actual
@@ @@
'DESCRIPTION' => 'TranslationOne.DESCRIPTION'
'subTitle' => 'TranslationOne.subTitle'
'overflow_style' => 'TranslationOne.overflow_style'
- 'last_operation_success' => 'TranslationOne.last_operation_success'
'metaTags' => 'TranslationOne.metaTags'
'Copyright' => 'TranslationOne.Copyright'
+ 'last_operation_success' => 'TranslationOne.last_operation_success'
)
/home/runner/work/CodeIgniter4/CodeIgniter4/tests/system/Commands/Translation/LocalizationFinderTest.php:202
/home/runner/work/CodeIgniter4/CodeIgniter4/tests/system/Commands/Translation/LocalizationFinderTest.php:58
phpvfscomposer:///home/runner/work/CodeIgniter4/CodeIgniter4/vendor/phpunit/phpunit/phpunit:106
3) CodeIgniter\Commands\Translation\LocalizationFinderTest::testUpdateWithEmptyDirOption
Failed asserting that two arrays are identical.
--- Expected
+++ Actual
@@ @@
'DESCRIPTION' => 'TranslationOne.DESCRIPTION'
'subTitle' => 'TranslationOne.subTitle'
'overflow_style' => 'TranslationOne.overflow_style'
- 'last_operation_success' => 'TranslationOne.last_operation_success'
'metaTags' => 'TranslationOne.metaTags'
'Copyright' => 'TranslationOne.Copyright'
+ 'last_operation_success' => 'TranslationOne.last_operation_success'
)
/home/runner/work/CodeIgniter4/CodeIgniter4/tests/system/Commands/Translation/LocalizationFinderTest.php:202
/home/runner/work/CodeIgniter4/CodeIgniter4/tests/system/Commands/Translation/LocalizationFinderTest.php:78
phpvfscomposer:///home/runner/work/CodeIgniter4/CodeIgniter4/vendor/phpunit/phpunit/phpunit:106 |
I see. But my test is running. aleksandr@aleksandr-debian:~/www/codeigniter$ vendor/bin/phpunit --color=always --no-coverage ./tests/system/Commands/Translation/LocalizationFinderTest.php
PHPUnit 9.6.10 by Sebastian Bergmann and contributors.
Runtime: PHP 8.2.7
Configuration: /home/aleksandr/www/codeigniter/phpunit.xml.dist
...... 6 / 6 (100%)
Nexus\PHPUnit\Extension\Tachycardia identified these 3 slow tests:
⚠ Took 1.17s from 0.50s limit to run CodeIgniter\\Commands\\Translation\\LocalizationFinderTest::testUpdateDefaultLocale
⚠ Took 1.16s from 0.50s limit to run CodeIgniter\\Commands\\Translation\\LocalizationFinderTest::testUpdateWithLocaleOption
⚠ Took 1.16s from 0.50s limit to run CodeIgniter\\Commands\\Translation\\LocalizationFinderTest::testUpdateWithEmptyDirOption
Time: 00:03.484, Memory: 12.00 MB
OK (6 tests, 18 assertions) Why isn't there a key when there is one? |
Probably you need to sort the order of the found files. |
2df8999
to
c776a05
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried to correct the inaccuracies. And the tests after sorting work.
Please add an entry for this feature in the changelog Enhancements > Commands. |
ccd7a8a
to
070d7e5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
@neznaika0 Thank you! |
Description
Supersedes #7889
See thread https://forum.codeigniter.com/showthread.php?tid=88299
Ready to discuss the solution.
Edit #7889: Start with branch 4.5
Checklist: