/** * Tests if getResources returns an ArrayCollection with the correct resources contained in. * */ public function testGetResourcesReturnsCollectionOfResources() { $resource = $this->getMockBuilder('\\Core\\Entity\\PermissionsResourceInterface')->getMockForAbstractClass(); $target = new Permissions(); $target->grant($resource, PermissionsInterface::PERMISSION_ALL); $coll = $target->getResources(); $this->assertEquals(1, $coll->count()); $this->assertSame($resource, $coll->current()); }