Exemplo n.º 1
0
 public function testIsItemModelDefined()
 {
     $item = $this->prophesize('core_kernel_classes_Resource');
     $this->assertFalse($this->itemsService->isItemModelDefined($item->reveal()));
     $item->getOnePropertyValue(new core_kernel_classes_Property(TAO_ITEM_MODEL_PROPERTY))->willReturn('notnull');
     $this->assertTrue($this->itemsService->isItemModelDefined($item->reveal()));
     $item->getOnePropertyValue(new core_kernel_classes_Property(TAO_ITEM_MODEL_PROPERTY))->willReturn(new \core_kernel_classes_Literal('notnull'));
     $this->assertTrue($this->itemsService->isItemModelDefined($item->reveal()));
 }