Skip to content

Commit

Permalink
Added PHP 5.6 and HHVM to Travis.
Browse files Browse the repository at this point in the history
Modified RequestListenerTest so it does not use the Crawler, that currently does not work with HHVM.
  • Loading branch information
h4cc committed Mar 3, 2014
1 parent eca9d25 commit 56f8c43
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ php:
- 5.3
- 5.4
- 5.5
- 5.6
- hhvm

env:
- SYMFONY_VERSION=2.1.*
Expand Down
6 changes: 4 additions & 2 deletions Tests/EventListener/RequestListenerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@ public function testDocQueryArg()
{
$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');
Expand Down

0 comments on commit 56f8c43

Please sign in to comment.