Skip to content

Commit

Permalink
Merge pull request #347 from h4cc/master
Browse files Browse the repository at this point in the history
Testing against HHVM and PHP 5.6
  • Loading branch information
willdurand committed Mar 10, 2014
2 parents eca9d25 + 56f8c43 commit 855f95a
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 855f95a

Please sign in to comment.