You are here

public function InvalidArgumentExceptionTest::testFromAbstractClass in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTest/Exception/InvalidArgumentExceptionTest.php \DoctrineTest\InstantiatorTest\Exception\InvalidArgumentExceptionTest::testFromAbstractClass()

File

vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTest/Exception/InvalidArgumentExceptionTest.php, line 72

Class

InvalidArgumentExceptionTest
Tests for { @author Marco Pivetta <ocramius@gmail.com>

Namespace

DoctrineTest\InstantiatorTest\Exception

Code

public function testFromAbstractClass() {
  $reflection = new ReflectionClass('DoctrineTest\\InstantiatorTestAsset\\AbstractClassAsset');
  $exception = InvalidArgumentException::fromAbstractClass($reflection);
  $this
    ->assertSame('The provided class "DoctrineTest\\InstantiatorTestAsset\\AbstractClassAsset" is abstract, ' . 'and can not be instantiated', $exception
    ->getMessage());
}