Nelmio\Alice\Throwable\Exception\NoValueForCurrentExceptionFactory::create PHP Метод

create() публичный статический Метод

public static create ( Nelmio\Alice\FixtureInterface $fixture ) : NoValueForCurrentException
$fixture Nelmio\Alice\FixtureInterface
Результат NoValueForCurrentException
    public static function create(FixtureInterface $fixture) : NoValueForCurrentException
    {
        return new NoValueForCurrentException(sprintf('No value for \'<current()>\' found for the fixture "%s".', $fixture->getId()));
    }

Usage Example

 public function testTestCreateException()
 {
     $exception = NoValueForCurrentExceptionFactory::create(new DummyFixture('dummy'));
     $this->assertEquals('No value for \'<current()>\' found for the fixture "dummy".', $exception->getMessage());
     $this->assertEquals(0, $exception->getCode());
     $this->assertNull($exception->getPrevious());
 }
All Usage Examples Of Nelmio\Alice\Throwable\Exception\NoValueForCurrentExceptionFactory::create
NoValueForCurrentExceptionFactory