Ejemplo n.º 1
0
 function testDoNotStubStaticMethods()
 {
     try {
         $foo = new Mockster(StubMethodsTest_FooClass::class);
         /** @noinspection PhpUndefinedMethodInspection */
         Mockster::stub($foo->staticMethod());
         $this->fail("Should have thrown an exception");
     } catch (\ReflectionException $e) {
         $this->assert->contains($e->getMessage(), 'static methods');
         $this->assert->contains($e->getMessage(), 'FooClass::staticMethod');
     }
 }