public function testCallWithJsonArg() { $args = array(1 => 'surname', '2' => '-j'); $fakeConsole = new FakeConsole($args); $result = (string) $fakeConsole->run(); $this->assertJson($result); }