public function testMasterGetCount() { $client = $this->getMock('\\Yesmail\\CurlClient', array('get', 'get_info'), array('', '')); $mockData = $this->_getTestMasterCountSuccessfulData(); $client->expects($this->at(0))->method('get')->will($this->returnValue($mockData['response'])); $client->expects($this->any())->method('get_info')->will($this->returnValue($mockData['info'])); $yesmail = new Yesmail($client, self::YESMAIL_TEST_URL); $masterId = 123; $ret = $yesmail->Master_Get_Count($masterId); $this->assertEquals($ret, json_decode($mockData['response'])); }