/** * Test get & set code by callable. * * @return void * * @since 2.0 * * @covers Windwalker\Console\Command\AbstractCommand::getHandler */ public function testSetAndgetCallableHandler() { $this->instance->handler(array($this, 'fakeHandler')); $code = $this->instance->getHandler(); $this->assertTrue(is_callable($code), 'Handler not exists'); $this->assertEquals('Hello', $this->instance->execute(), 'Handler result failure.'); $this->instance->handler(null); $this->assertEquals(null, $this->instance->getHandler(), 'Handler should have been cleaned'); }