public function run(array $args) { Message::write(Message::$startTemplate); $this->handleArgs($args); $this->handleOptions($args); Message::write(Message::$loadingTemplate); $loader = new Loader($this->arguments['json'], $this->options); $objects = $loader->load(); Message::write(Message::$writingTemplate); $writer = new Writer($this->arguments['directory'], $objects); $writer->write(); Message::write(Message::$thanksTemplate); }
/** * @expectedException \Json2Dto\Exceptions\JsonDecodeProblemException */ public function testJsonDecodeProblem() { $loader = new Loader(__DIR__ . '/Resources/json_broken_file.json', array('--namespace' => 'Json2Dto')); $loader->load(); }