public function testNonExistantMethod() { $this->setExpectedException('BadMethodCallException', 'Unknown method "foobar" called on node'); $this->node->foobar(); }