Пример #1
0
 public function testResourceSetCanRemoveChildren()
 {
     $resource1 = new Resource();
     $this->tester->assertThrows(function () {
         $this->resourceSet->removeChild('reallyInvalidId');
     }, 'Exception', 'An exception as to be thrown.');
     $this->resourceSet->addChild($resource1);
     $this->assertContains($resource1, $this->resourceSet->getResources());
     $this->resourceSet->removeChild($resource1->getId());
     $this->assertNotContains($resource1, $this->resourceSet->getResources());
 }