Exemple #1
0
 public function testExecutorSelection()
 {
     $default = function_exists('curl_version') ? 'Postman_Google_IO_Curl' : 'Postman_Google_IO_Stream';
     $client = $this->getClient();
     $this->assertInstanceOf($default, $client->getIo());
     $config = new Postman_Google_Config();
     $config->setIoClass('Postman_Google_IO_Stream');
     $client = new Postman_Google_Client($config);
     $this->assertInstanceOf('Postman_Google_IO_Stream', $client->getIo());
 }
Exemple #2
0
 /**
  * Set the IO object
  * @param Postman_Google_IO_Abstract $io
  */
 public function setIo(Postman_Google_IO_Abstract $io)
 {
     $this->config->setIoClass(get_class($io));
     $this->io = $io;
 }