예제 #1
0
 public function testIsItemClass()
 {
     $clazz = $this->prophesize('core_kernel_classes_Class');
     $clazz->getUri()->willReturn(TAO_ITEM_CLASS);
     $this->assertTrue($this->itemsService->isItemClass($clazz->reveal()));
     $clazz = $this->prophesize('core_kernel_classes_Class');
     $clazz->getUri()->willReturn('uri');
     $parent = $this->prophesize('core_kernel_classes_Class');
     $parent->getUri()->willReturn(TAO_ITEM_CLASS);
     $clazz->getParentClasses(true)->willReturn(array($parent->reveal()));
     $this->assertTrue($this->itemsService->isItemClass($clazz->reveal()));
 }