æè¿å¡«ã£ãã®ã次ã®ãããªãã¹ãã <?php require_once 'PHPUnit/Framework.php'; class ATest extends PHPUnit_Framework_TestCase { public function testExecute() { $obj = $this->getMock('AnObject', array('execute')); $obj->expects($this->any()) ->method('execute') ->will($this->returnValue('1')); $this->assertEquals('00000001', $obj->execute()); } } AnObjectãªãã¸ã§ã¯ãã®executeã¡ã½ãããå©ãã¨æååã®"1"ãè¿ãããã®ã§ãããå®è¡ããã¨ãã¹ãã«ãã¹ãã¦ãã¾ãã¾ãã $ p
{{#tags}}- {{label}}
{{/tags}}