The method {@link load()} needs to be called before calling this method,
otherwise an exception is thrown.
public isNotFound ( ) : boolean | ||
return | boolean | Returns `true` if the state is {@link PathMappingState::NOT_FOUND}. |
public function testLoadStoresErrorsIfNoPathFound() { $mapping = new PathMapping('/path', array('foo', 'bar')); $mapping->load($this->package1, $this->packages); $this->assertSame(array('foo', 'bar'), $mapping->getPathReferences()); $this->assertSame(array(), $mapping->getFilesystemPaths()); // no found path, not enabled $this->assertFalse($mapping->isEnabled()); $this->assertTrue($mapping->isNotFound()); $loadErrors = $mapping->getLoadErrors(); $this->assertCount(2, $loadErrors); $this->assertInstanceOf('Puli\\Manager\\Api\\FileNotFoundException', $loadErrors[0]); $this->assertInstanceOf('Puli\\Manager\\Api\\FileNotFoundException', $loadErrors[1]); }