getMap(); $this->assertTrue(is_array($interactions)); } /** * * @author Lionel Lecaque, lionel@taotesting.com */ public function testSet() { $prophet = new \Prophecy\Prophet(); $hookProphecy = $prophet->prophesize('oat\taoQtiItem\model\Hook'); $hook = $hookProphecy->reveal(); HookRegistry::getRegistry()->set('fakeInteraction', get_class($hook)); $interactions = HookRegistry::getRegistry()->getMap(); $this->assertEquals(get_class($hook), $interactions['fakeInteraction']); } /** * @depends testSet * @author Lionel Lecaque, lionel@taotesting.com */ public function testGet() { $interactions = HookRegistry::getRegistry()->getMap(); $this->assertEquals($interactions['fakeInteraction'], HookRegistry::getRegistry()->get('fakeInteraction')); } /** * @depends testSet * * @author Lionel Lecaque, lionel@taotesting.com */ public function testRemove() { $interactions = HookRegistry::getRegistry()->getMap(); $this->assertTrue(isset($interactions['fakeInteraction'])); HookRegistry::getRegistry()->remove('fakeInteraction'); $interactions = HookRegistry::getRegistry()->getMap(); $this->assertFalse(isset($interactions['fakeInteraction'])); } }