Added PHP 5.6 and HHVM to Travis.

Modified RequestListenerTest so it does not use the Crawler, that currently does not work with HHVM.
This commit is contained in:
Julius Beckmann 2014-03-03 18:44:37 +01:00
parent eca9d25ca7
commit 56f8c43849
2 changed files with 6 additions and 2 deletions

View File

@ -4,6 +4,8 @@ php:
- 5.3
- 5.4
- 5.5
- 5.6
- hhvm
env:
- SYMFONY_VERSION=2.1.*

View File

@ -19,8 +19,10 @@ class RequestListenerTest extends WebTestCase
{
$client = $this->createClient();
$crawler = $client->request('GET', '/tests?_doc=1');
$this->assertEquals('/tests.{_format}', trim($crawler->filter(".operation .path:contains('/tests')")->text()), 'Event listener should capture ?_doc=1 requests');
$client->request('GET', '/tests?_doc=1');
$content = $client->getResponse()->getContent();
$this->assertTrue(0 !== strpos($content, '<h1>API documentation</h1>'), 'Event listener should capture ?_doc=1 requests');
$this->assertTrue(0 !== strpos($content, '/tests.{_format}'), 'Event listener should capture ?_doc=1 requests');
$client->request('GET', '/tests');
$this->assertEquals('tests', $client->getResponse()->getContent(), 'Event listener should let normal requests through');