Esempio n. 1
0
File: Embedder.php Progetto: n8b/VMN
 /**
  * Get entity sniffed from URL
  * @return ElggEntity|false
  */
 public function getEntity()
 {
     if (isset($this->entity)) {
         return $this->entity;
     }
     return $this->url->getEntity();
 }
Esempio n. 2
0
 /**
  * @covers ::getEntity
  */
 public function testGetEntity()
 {
     $this->object->setURL('http://localhost/');
     $this->assertEquals($this->object->getEntity('http://localhost/'), false);
     $this->object->setURL('http://localhost/');
     $this->assertEquals($this->object->getEntity('http://bar/'), false);
     /** @todo: mock get_entity() * */
     // $this->object->setURL('http://localhost/foo/123');
     // $this->assertInstanceOf('ElggEntity', $this->object->getEntity('http://localhost/'));
 }