liip / LiipTranslationBundle

Tools for translation management
MIT License
25 stars 11 forks source link

fix HHVM support #29

Open lsmith77 opened 9 years ago

lsmith77 commented 9 years ago

see https://travis-ci.org/liip/LiipTranslationBundle/jobs/45996579

63.46s$ phpunit --coverage-text && phpunit Tests/Controller/SecurityTest.php
PHPUnit 4.4.0 by Sebastian Bergmann.
Configuration read from /home/travis/build/liip/LiipTranslationBundle/phpunit.xml.dist
....F............................
Time: 1.03 minutes, Memory: 64.63Mb
There was 1 failure:
1) Liip\TranslationBundle\Tests\Controller\ImportControllerTest::testProcessing
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'new_value2'
+'value2'
fabre-thibaud commented 9 years ago

So far, it looks like an issue with the crawler and session management.

Commenting out https://github.com/liip/LiipTranslationBundle/blob/master/Tests/Controller/ImportControllerTest.php#L122-L125 makes the test pass and value is correctly updated, so it seems that session content is lost after the redirect.

I dont know enough about DomCrawler (ie. how are sessions managed, does it spawn a server, etc...) to say as to why the redirect is dropping the updated values, I'll try to investigate further tonight.

lsmith77 commented 9 years ago

@aztech-dev yeah .. I can confirm this. the data written to disk are the same. I also tried refactoring things to use another request to fetch the data, rather than going to the container directly and that doesn't change anything either.

lsmith77 commented 9 years ago

@jeanmonod I wonder if we should not just remove this assertion so that we can mark HHVM as compatible in travis .. wdyt?

jeanmonod commented 9 years ago

If you think that this is a bug in the DomCrawler why not. Is anybody have tried to reproduce/test the import action in a real browser?