class SilexApplicationTest in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/stack/builder/tests/functional/SilexApplicationTest.php \functional\SilexApplicationTest
Hierarchy
- class \functional\SilexApplicationTest extends \functional\PHPUnit_Framework_TestCase
Expanded class hierarchy of SilexApplicationTest
File
- vendor/
stack/ builder/ tests/ functional/ SilexApplicationTest.php, line 10
Namespace
functionalView source
class SilexApplicationTest extends \PHPUnit_Framework_TestCase {
public function testWithAppendMiddlewares() {
$app = new Application();
$app
->get('/foo', function () {
return 'bar';
});
$finished = false;
$app
->finish(function () use (&$finished) {
$finished = true;
});
$stack = new Builder();
$stack
->push('functional\\Append', '.A')
->push('functional\\Append', '.B');
$app = $stack
->resolve($app);
$request = Request::create('/foo');
$response = $app
->handle($request);
$app
->terminate($request, $response);
$this
->assertSame('bar.B.A', $response
->getContent());
$this
->assertTrue($finished);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
SilexApplicationTest:: |
public | function |