public function getChild($name)
{
$childName = $this->getRealChildName($name);
foreach ($this->children as $child) {
if ($child->getName() === $childName) {
return $child;
}
if ($child->appliesTo($childName) === true && $child->hasChild($childName) === true) {
return $child->getChild($childName);
}
}
return null;
}
/** * @expectedException RuntimeException */ public function testShouldThrowExceptionWhenDeletionNotPermitted() { $this->root->chmod(0555); $this->root->getChild('testfile2')->chmod(0555); $localDelete = new DefaultDelete($this->root->url() . '/testfile2'); $localDelete->execute(); }