Nelmio\Alice\Throwable\Exception\Generator\Instantiator\InstantiationExceptionFactory::createForInstantiatorNotFoundForFixture PHP Method

createForInstantiatorNotFoundForFixture() public static method

public static createForInstantiatorNotFoundForFixture ( Nelmio\Alice\FixtureInterface $fixture ) : InstantiatorNotFoundException
$fixture Nelmio\Alice\FixtureInterface
return InstantiatorNotFoundException
    public static function createForInstantiatorNotFoundForFixture(FixtureInterface $fixture) : InstantiatorNotFoundException
    {
        return new InstantiatorNotFoundException(sprintf('No suitable instantiator found for the fixture "%s".', $fixture->getId()));
    }

Usage Example

 public function testTestCreateForInstantiatorNotFoundForFixture()
 {
     $exception = InstantiationExceptionFactory::createForInstantiatorNotFoundForFixture(new DummyFixture('foo'));
     $this->assertEquals('No suitable instantiator found for the fixture "foo".', $exception->getMessage());
     $this->assertEquals(0, $exception->getCode());
     $this->assertNull($exception->getPrevious());
 }
All Usage Examples Of Nelmio\Alice\Throwable\Exception\Generator\Instantiator\InstantiationExceptionFactory::createForInstantiatorNotFoundForFixture