/** * testAddHook method * * @return void * @access public */ function testAddHook() { $_hooks = AutopilotShell::$hooks; AutopilotShell::$hooks = array(); $callback = 'sprintf'; $this->Autopilot->addHook(Hooks::green, $callback); $expected = array(Hooks::green => array($callback)); $this->assertEqual(AutopilotShell::$hooks, $expected); AutopilotShell::$hooks = $_hooks; }