mirror of
https://github.com/retailcrm/NelmioApiDocBundle.git
synced 2025-02-02 15:51:48 +03:00
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:
parent
eca9d25ca7
commit
56f8c43849
@ -4,6 +4,8 @@ php:
|
|||||||
- 5.3
|
- 5.3
|
||||||
- 5.4
|
- 5.4
|
||||||
- 5.5
|
- 5.5
|
||||||
|
- 5.6
|
||||||
|
- hhvm
|
||||||
|
|
||||||
env:
|
env:
|
||||||
- SYMFONY_VERSION=2.1.*
|
- SYMFONY_VERSION=2.1.*
|
||||||
|
@ -19,8 +19,10 @@ class RequestListenerTest extends WebTestCase
|
|||||||
{
|
{
|
||||||
$client = $this->createClient();
|
$client = $this->createClient();
|
||||||
|
|
||||||
$crawler = $client->request('GET', '/tests?_doc=1');
|
$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');
|
$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');
|
$client->request('GET', '/tests');
|
||||||
$this->assertEquals('tests', $client->getResponse()->getContent(), 'Event listener should let normal requests through');
|
$this->assertEquals('tests', $client->getResponse()->getContent(), 'Event listener should let normal requests through');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user