public function testIsSupportedEntityWrongEntity() { $testEntity = new \stdClass(); $this->doctrineHelper->expects($this->once())->method('getEntityClass')->with($testEntity)->will($this->returnValue('\\stdClass')); $this->assertFalse($this->provider->isSupportedEntity($testEntity)); }
public function testIsSupportedOwnerEntity() { $testEntity = new \stdClass(); $this->doctrineHelper->expects($this->any())->method('getEntityClass')->with($testEntity)->willReturn(TestActivityProvider::ACL_CLASS); $this->assertTrue($this->provider->isSupportedEntity($testEntity)); }
/** * Check if given entity supports by activity list providers * * @param $entity * @return bool */ public function isSupportedEntity($entity) { return $this->chainProvider->isSupportedEntity($entity); }