Skip to content

Commit

Permalink
Add functional test on controller
Browse files Browse the repository at this point in the history
  • Loading branch information
flohw committed Apr 10, 2024
1 parent e0927f6 commit 30d97dc
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Tests/Functional/ViewResponseListenerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,12 @@ public function testRedirect()
$this->assertSame('http://localhost/hello/Post%201', $client->getResponse()->headers->get('location'));
$this->assertStringNotContainsString('fooo', $client->getResponse()->getContent());
}

public function testControllerReturnsView()
{
$client = $this->createClient(['test_case' => 'ViewResponseListener']);
$client->request('GET', '/articles.json');

$this->assertTrue($client->getResponse()->isSuccessful());
}
}

0 comments on commit 30d97dc

Please sign in to comment.