assertEquals('foobar', $command->getName()); } public function testCommandExecution() { $hit = false; $command = new Command("foobar", function () use (&$hit) { $hit=true; }); $context = new Context("foobar", []); $command->call($context); $this->assertEquals(true, $hit); } }