class ExceptionDataCollectorTest in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/http-kernel/Tests/DataCollector/ExceptionDataCollectorTest.php \Symfony\Component\HttpKernel\Tests\DataCollector\ExceptionDataCollectorTest
Hierarchy
- class \Symfony\Component\HttpKernel\Tests\DataCollector\ExceptionDataCollectorTest extends \Symfony\Component\HttpKernel\Tests\DataCollector\PHPUnit_Framework_TestCase
Expanded class hierarchy of ExceptionDataCollectorTest
File
- vendor/
symfony/ http-kernel/ Tests/ DataCollector/ ExceptionDataCollectorTest.php, line 19
Namespace
Symfony\Component\HttpKernel\Tests\DataCollectorView source
class ExceptionDataCollectorTest extends \PHPUnit_Framework_TestCase {
public function testCollect() {
$e = new \Exception('foo', 500);
$c = new ExceptionDataCollector();
$flattened = FlattenException::create($e);
$trace = $flattened
->getTrace();
$this
->assertFalse($c
->hasException());
$c
->collect(new Request(), new Response(), $e);
$this
->assertTrue($c
->hasException());
$this
->assertEquals($flattened, $c
->getException());
$this
->assertSame('foo', $c
->getMessage());
$this
->assertSame(500, $c
->getCode());
$this
->assertSame('exception', $c
->getName());
$this
->assertSame($trace, $c
->getTrace());
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ExceptionDataCollectorTest:: |
public | function |