public function getPath($snapshotName = '')
{
if ($snapshotName) {
if (isset($this->pathSnapshot[$snapshotName]) === false) {
return '';
}
return $this->pathSnapshot[$snapshotName];
}
return isset($this->pathSnapshot[self::SNAPSHOT_PATH_LAST]) === true ? $this->pathSnapshot[self::SNAPSHOT_PATH_LAST] : '';
}
public function testPathNotInitialized() { $item = new Item('Raw content', 'index.html', []); $this->assertEquals('', $item->getPath()); }