Skip to content

Commit

Permalink
Added another test
Browse files Browse the repository at this point in the history
  • Loading branch information
jmather committed Oct 4, 2012
1 parent 5d53fac commit 9016101
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion Tests/AcceptHeaderRoutingTest.php
Expand Up @@ -62,7 +62,7 @@ public function createApplication()
return $app;
}

public function testValidV1Call()
public function testValidV1XMLCall()
{
$client = $this->createClient();

Expand All @@ -75,6 +75,19 @@ public function testValidV1Call()
$this->assertEquals('<content>hello</content>', $result, 'response is correct');
}

public function testValidV1JSONCall()
{
$client = $this->createClient();

$crawler = $client->request('GET', '/test', array(), array(), array('HTTP_ACCEPT' => 'application/ven.test.v1+json'));

$this->assertEquals(200, $client->getResponse()->getStatusCode());

$result = $client->getResponse()->getContent();

$this->assertEquals('{"content":"hello"}', $result, 'response is correct');
}

public function testValidV2Call()
{
$client = $this->createClient();
Expand Down

0 comments on commit 9016101

Please sign in to comment.