/**
  * Delete items, test & delivery
  *
  * @param \core_kernel_classes_Resource $delivery
  * @param $testUri
  */
 public function removeDeliveryTest(\core_kernel_classes_Resource $delivery, $testUri)
 {
     $test = new \core_kernel_classes_Resource($testUri);
     $items = $this->testService->getItems($test);
     /** @var \core_kernel_classes_Resource $item */
     foreach ($items as $item) {
         // Delete resource & files
         $this->itemService->deleteResource($item);
         $this->assertFalse($item->exists());
     }
     $this->testService->deleteContent($test);
     $this->testService->deleteResource($test);
     $this->assertFalse($test->exists());
     $this->deliveryService->deleteInstance($delivery);
     $this->assertFalse($delivery->exists());
 }
Exemplo n.º 2
0
 /**
  * @depends testInstantiateClass
  * @param \core_kernel_classes_Resource $instance
  */
 public function testDeleteInstance($instance)
 {
     $this->assertTrue($this->itemsService->deleteResource($instance));
     $this->assertFalse($instance->exists());
 }