/** * Test all getters for the values set with the constructor. */ public function testConstructorAccessors() { $code = mt_rand(1, 100); $precedence = mt_rand(1, 100); $closure = function () { }; $operator = new UnaryOperator($code, $precedence, $closure); $this->assertSame($code, $operator->getCode()); $this->assertSame($precedence, $operator->getPrecedence()); $this->assertSame($closure, $operator->getNode()); }