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
Fixing PhpUnit support for windows #8694
Conversation
This reverts commit 93f4c41.
i executed folders: core/plugins/tests |
Getting closer... |
The unit test run now all on windows, expect one...but thats hard to fix since its a file lock with a parallel request! @tsteur i'm done with it...if you think its good you can merge it.
|
I'm getting the same error under Linux/Ubuntu. Never looked into it. |
After this is merged, i will look into #8648 again |
setlocale(LC_CTYPE, ''); | ||
} | ||
|
||
public static function setDefaultLocale() | ||
{ | ||
self::setLocale('en_US.UTF-8'); | ||
self::setLocale(['en_US.UTF-8', 'en-US']); |
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.
fyi: we still need to use php 5.3 array notation
did you make this change because you do not have utf8 locales on windows?
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.
Left a comment, otherwise looks good to me 👍 |
@mattab ty for the review. I changed that line |
Fixing PhpUnit support for windows
Thanks @ThaDafinser - btw are tests passing on your Windows machine now? |
@mattab with this PR yes. Expect this error
|
from @diosmosis
|
I think switching between branches became problematic because of matomo-org/matomo#8694
@ThaDafinser I'm having problems when switching between branches that do not contain this Our developer docs generator had similar problems and workaround for now is to stop switching between branches: matomo-org/developer-documentation#102 Do you know what I mean? Have you ever had such problems? Do you maybe know how to fix it? |
@tsteur i had that problems some time ago - the changes are just the diff between \n and \r\n _Solution should be_ https://help.github.com/articles/dealing-with-line-endings/#refreshing-a-repository-after-changing-line-endings |
It kinda works but always have to do it when switching to master because of a few files eg (.gz files). Is there a more permanent solution do this? It always takes me a couple of minutes to switch to eg master |
@tsteur then we have to add the .gz files too ignore that
|
A side note: This addition will ensure in the future, that there are no compability issues between the OS which is used by developers. It's also a part of |
I think .gz is already listed here, I'll have a look next time I face that issue again. Yes I definitely see a value in it just wondering if there's a more efficient way to switch between branches :) |
It's actually those files that make me trouble:
|
@tsteur This happens when switching to a branch older than the .gitattributes file. You can deal w/ this by:
After this, you won't see the problem for the branch. |
Thx a lot I'll try it next time |
I think it worked, thx! Only the rebasing hurt a lot this time hehe (there were many changes in many places :) ) |
Guess that .gitattributes are also causing some test failures for plugins... See https://travis-ci.org/piwik/plugin-TasksTimetable/builds/82189993 or https://travis-ci.org/PiwikPRO/plugin-InterSites/jobs/82195390 |
Another way would be to define only some filetypes: *.php eol=lf http://permalink.gmane.org/gmane.comp.version-control.git/266905
|
@sgiehl @ThaDafinser Created issue: #8879 - any idea or even PR welcome |
Allow running tests on windows
http://forum.piwik.org/read.php?15,126943
Started around with this
php console tests:run unit