コード例 #1
0
 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));
 }
コード例 #2
0
 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));
 }
コード例 #3
0
 /**
  * Check if given entity supports by activity list providers
  *
  * @param $entity
  * @return bool
  */
 public function isSupportedEntity($entity)
 {
     return $this->chainProvider->isSupportedEntity($entity);
 }