48416[BUGFIX] Get current locale without changing environment
Commit message
Review
-
Code review CR +2
- Morton Jonuschat +2
- Markus Klein +1
-
Verified V +2
- Morton Jonuschat +2
- Markus Klein +1
Issues 1
Files 2
Review log 10
-
Christian Kuhn uploaded patch set 1 05/31/16, 10:43
-
Christian Kuhn commented on patch set 1 05/31/16, 10:52
catharsis: https://travis-ci.org/lolli42/TYPO3.CMS-Catharsis/builds/134128318 -
Markus Klein commented on patch set 1 05/31/16, 10:56
FloatValidatorTest.php:63these tests are subject to fail anyways, since on some servers this locale is called 'de_DE.UTF-8' -
Elmar Hinz commented on patch set 1 05/31/16, 10:58
Isn't it a general issue, that some unit tests may need to set environment variables influencing other test when not properly set back? IMHO running test with the processIsolation option could solve this, but is is only set for functional tests. What do you think of a third type in between, unit tests, but called with process isolation? -
Mathias Brodala commented on patch set 1 05/31/16, 11:01
> What do you think of a third type in between, unit tests, but > called with process isolation? Or simply run this test in isolation, it's only a single annotation to add. -
Elmar Hinz commented on patch set 1 05/31/16, 11:12
Right. I was looking for such an annotation, too. I just comes by a different name: @runInSeparateProcess There is also an annotation to run all tests of the class in isolation: @runTestsInSeparateProcesses -
Christian Kuhn commented on patch set 1 05/31/16, 12:20
no process isolation for unit tests, pleas. this would make the setup much slower, error handling is more complicated and xdebug doesn't work well. actually, the tests are encapsulated pretty well - most globals are backed up (except one where i'll add another patch soonish), and there is not that much global scope that annoys us apart from php built-in global scope like this locale stuff. other than that, there is mostly only singleton handling, and that is currently clean and an integrity test checks this is not messed up. So: keep current encapsulation and only fix the remaining details that are left.FloatValidatorTest.php:63Replyyes, i'll try to tackle that with additional setup tests later. this one is to fix this annoying error. -
Markus Klein voted on patch set 1 CR +1 V +1 05/31/16, 13:45
-
Morton Jonuschat voted on patch set 1 CR +2 V +2 05/31/16, 15:24
-
Gerrit merged patch set 1 05/31/16, 15:24