class TwitterClient { public function tweet($message) { return true; } } $hoge = new TwitterClient(); $hoge->tweet('大å¿ãªã'); // trueãè¿ã class ClientContainerTest extends PHPUnit_Framework_TestCase { public function test_ã¢ãã¯ãæ¸ãã¦ã¿ã() { $hoge = $this->getMock('TwitterClient', array('tweet')); $hoge->expects($this->any()) ->method('tweet') ->will($this->returnValue(true)); $hoge->tweet('大å¿ãªã'); // true
{{#tags}}- {{label}}
{{/tags}}