LiipTranslationBundle icon indicating copy to clipboard operation
LiipTranslationBundle copied to clipboard

fix HHVM support

Open lsmith77 opened this issue 10 years ago • 4 comments

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'

lsmith77 avatar Jan 06 '15 10:01 lsmith77

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.

fabre-thibaud avatar Jan 06 '15 12:01 fabre-thibaud

@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 avatar Oct 25 '15 12:10 lsmith77

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

lsmith77 avatar Oct 25 '15 12:10 lsmith77

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?

jeanmonod avatar Oct 26 '15 07:10 jeanmonod