public function testProducesHelpfulErrorMessages() { // $badAst1 = { random: 'Data' }; $badAst = (object) ['random' => 'Data']; $this->setExpectedException('Exception', 'Invalid AST Node: {"random":"Data"}'); Printer::doPrint($badAst); }