Exemplo n.º 1
0
 public function testPostUrlCreated()
 {
     $curlRequestMock = $this->getMock('MadMimi\\CurlRequest');
     $curlRequestMock->method('getInfo')->willReturn(200);
     $connectionMock = $this->getMockBuilder('MadMimi\\Connection')->setMethods(['debug'])->setConstructorArgs(['*****@*****.**', 'api-key-sir', $curlRequestMock])->getMock();
     $connectionMock->expects($spy = $this->any())->method('debug');
     $options = new Add();
     $options->setName('the-list-name');
     $connectionMock->request($options);
     $invocations = $spy->getInvocations();
     $this->assertEquals('Url: https://api.madmimi.com/audience_lists', $invocations[2]->parameters[0]);
 }
Exemplo n.º 2
0
 public function testGetRequestType()
 {
     $options = new Add();
     $this->assertEquals('post', $options->getRequestType());
 }