We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
// 架樁(打樁) // whateverYouImagine:name the method $stub = $this->getMockBuilder('SomeClassNeededToTest') ->setMethods(array('fakeFunctionNameToTesting')) ->getMock(); // 設定回傳值 $stub->expects($this->any()) ->method('whateverYouImagineFunctionNameToTesting') ->will($this->returnValue('someFakeValueToReturn'); // 測試 $this->assertEquals('someFakeValueToReturn', $stub->fakeFunctionNameToTesting());