public function testConstructor() { $this->parser = new Parser('2+2'); $this->assertEquals((string) 4, $this->parser->getResult()); }
/** * @expectedException \UnexpectedValueException */ public function testOutOfScopeException() { $parser = new Parser(' This is a test 4-2'); $parser->setThrowExceptions(); echo $parser->getResult(); }