/** * @param array $ret * @param array|null $expected * @return Alphasms */ protected function createObject($ret = [], $expected = null) { $obj = new Alphasms('testkey'); $client = $this->getMock('Werkint\\Alphasms\\Sender'); $client->expects($this->exactly(1))->method('execute')->with($expected === null ? $this->isType('array') : $this->equalTo($expected))->will($this->returnValue($ret)); $obj->setSender($client); return $obj; }
/** * {@inheritdoc} */ public function sendSms($target, $message) { return parent::sendMessage($target, $message, $this->from); }