Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fixed FileTest::testRename to work for windows file system. #44

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

Closed
wants to merge 4 commits into from
Closed

Fixed FileTest::testRename to work for windows file system. #44

wants to merge 4 commits into from

Conversation

umpirsky
Copy link
Contributor

@umpirsky umpirsky commented Jan 7, 2011

Hi.

I'm coming from the Zend Framework world. And I must say - brilliant framework. I decided to commit some of my time looking at it.

First I tried to run tests, and there are some suggestions on how to make it play nice with windows.

When i first run test, I get a number of warnings rearding timezone settings:

"Warning: It is not safe to rely on the system's timezone settings. You are required to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier."

So I added it to bootstrap.

After that, I got this:

PHPUnit 3.5.5 by Sebastian Bergmann.

.................E.......................................... 60 / 1980
............................................................ 120 / 1980
............................................................ 180 / 1980
............................................................ 240 / 1980
............................................................ 300 / 1980
............................................................ 360 / 1980
............................................................ 420 / 1980
............................................................ 480 / 1980
............................................................ 540 / 1980
............................................................ 600 / 1980
............................................................ 660 / 1980
............................................................ 720 / 1980
............................................................ 780 / 1980
............................................................ 840 / 1980
.......F.................................................... 900 / 1980
............................................................ 960 / 1980
.................E.......................................... 1020 / 1980
........................................S................... 1080 / 1980
............................................................ 1140 / 1980
............................................................ 1200 / 1980
............................................................ 1260 / 1980
............................................................ 1320 / 1980
............................................................ 1380 / 1980
............................................................ 1440 / 1980
............................................................ 1500 / 1980
............................................................ 1560 / 1980
............................................................ 1620 / 1980
............................................................ 1680 / 1980
............................................................ 1740 / 1980
............................................................ 1800 / 1980
............................................................ 1860 / 1980
............................................................ 1920 / 1980
............................................................ 1980 / 1980

Time: 7 seconds, Memory: 50.50Mb

There were 2 errors:

  1. Symfony\Tests\Component\BrowserKit\ClientTest::testInsulatedRequests
    RuntimeException: Unable to find the PHP executable.

G:\projects\PHP\symfony\src\Symfony\Component\Process\PhpProcess.php:88
G:\projects\PHP\symfony\src\Symfony\Component\Process\PhpProcess.php:58
G:\projects\PHP\symfony\src\Symfony\Component\BrowserKit\Client.php:236
G:\projects\PHP\symfony\src\Symfony\Component\BrowserKit\Client.php:206
G:\projects\PHP\symfony\tests\Symfony\Tests\Component\BrowserKit\ClientTest.php:289

  1. Symfony\Tests\Component\HttpKernel\ClientTest::testGetScript
    RuntimeException: Unable to find the PHP executable.

G:\projects\PHP\symfony\src\Symfony\Component\Process\PhpProcess.php:88
G:\projects\PHP\symfony\src\Symfony\Component\Process\PhpProcess.php:58
G:\projects\PHP\symfony\src\Symfony\Component\BrowserKit\Client.php:236
G:\projects\PHP\symfony\src\Symfony\Component\BrowserKit\Client.php:206
G:\projects\PHP\symfony\tests\Symfony\Tests\Component\HttpKernel\ClientTest.php:53

There was 1 failure:

  1. Symfony\Tests\Component\HttpFoundation\File\FileTest::testRename
    Failed asserting that two strings are equal.
    --- Expected
    +++ Actual
    @@ @@
    -G:\projects\PHP\symfony\tests\Symfony\Tests\Component\HttpFoundation\File/Fixtures/test.target.gif
    +G:\projects\PHP\symfony\tests\Symfony\Tests\Component\HttpFoundation\File\Fixtures\test.target.gif

G:\projects\PHP\symfony\tests\Symfony\Tests\Component\HttpFoundation\File\FileTest.php:109

FAILURES!
Tests: 1980, Assertions: 5015, Failures: 1, Errors: 2, Skipped: 1.

I fixed FileTest::testRename, but RuntimeException: Unable to find the PHP executable.
left unresolved, probably there is hardcoded path to /usr/bin/env php

Regards,
Saša Stamenković.

@fabpot
Copy link
Member

fabpot commented Jan 7, 2011

I have merged the testRename() fix but not the timezone one as you should really do that in your php.ini file.

@umpirsky
Copy link
Contributor Author

umpirsky commented Jan 7, 2011

Ah yes, you are right. Thanks.

dawehner pushed a commit to dawehner/symfony that referenced this pull request Jul 1, 2013
add an interface for the generator to know if it has the supports method
jderusse pushed a commit to jderusse/symfony that referenced this pull request Mar 30, 2020
chalasr pushed a commit to chalasr/symfony that referenced this pull request Sep 24, 2020
Added quick note about using the --dev flag
stobrien89 pushed a commit to stobrien89/symfony that referenced this pull request Feb 27, 2025
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants