/** * @expectedException BadMethodCallException * @expectedExceptionMessage Call to undefined method ExampleExtendableClass::undefinedMethod() */ public function testCallingUndefinedStaticMethod() { $result = ExampleExtendableClass::undefinedMethod(); $this->assertEquals('bar', $result); }