/** * @covers hypeJunction\Inbox\Group::add * @covers hypeJunction\Inbox\Group::entities * @covers hypeJunction\Inbox\Group::toEntity */ public function testEntities() { $mock = $this->getMock('\\ElggEntity'); $mock->expects($this->once())->method('getGUID')->willReturn(4); $entities = $this->object->add('foo')->add(array('bar', new stdClass()))->add(0)->add(1)->add(array(2, 3))->add($mock)->entities(); $this->assertInternalType('array', $entities); foreach ($entities as $entity) { $this->assertInstanceOf('\\ElggEntity', $entity); } }