'bar') ); $this->assertInstanceOf('Doctrine\ORM\EntityNotFoundException', $exception); $this->assertSame('Entity of type \'foo\' for IDs foo(bar) was not found', $exception->getMessage()); $exception = EntityNotFoundException::fromClassNameAndIdentifier( 'foo', array() ); $this->assertInstanceOf('Doctrine\ORM\EntityNotFoundException', $exception); $this->assertSame('Entity of type \'foo\' was not found', $exception->getMessage()); } }