Example #1
0
 /**
  * @testdox Executa uma requisição para url informada
  * @depends testRecebeObjetoOptions
  */
 public function testExec(Transport $transport)
 {
     $transport->setUrl('https://github.com/');
     $data = $transport->exec();
     $this->assertSame(200, $data['httpStatusCode']);
     return $transport;
 }
Example #2
0
 /**
  * @depends testRecebeObjetoOptions
  */
 public function testExecutaRequisiçãoAUmaUrlInformada(Transport $transport)
 {
     $transport->setUrl('https://github.com/');
     $data = $transport->exec();
     $this->assertEquals(200, $data['httpStatusCode']);
     return $transport;
 }
Example #3
0
 protected function factoryTransport()
 {
     $transport = new Transport($this->getOptions());
     $path = $this->getOptions()->get('registerPath', false);
     if ($path) {
         $transport->setRegisterPath($path);
     }
     return $transport;
 }