/** * Test that autoload doesn't get called on generated classes */ public function testAutoLoadNotCalledOnMock() { spl_autoload_register(array(__CLASS__, 'autoload')); $mockedClass = 'stdClass'; $mockGenerator = $this->getMock('Phake_ClassGenerator_MockClass'); //This test will fail if the autoload below is called $this->facade->mock($mockedClass, $mockGenerator, $this->getMock('Phake_CallRecorder_Recorder'), $this->getMock('Phake_Stubber_IAnswer')); spl_autoload_unregister(array(__CLASS__, 'autoload')); }
public function testReset() { $this->facade->resetStaticInfo(); Phake::verify($this->infoRegistry)->resetAll(); }