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()); }
public function testIniConfig() { $config = new Postman_Google_Config(__DIR__ . "/testdata/test.ini"); $this->assertEquals('My Test application', $config->getApplicationName()); $this->assertEquals('gjfiwnGinpena3', $config->getClassConfig('Postman_Google_Auth_OAuth2', 'client_secret')); $this->assertInternalType('array', $config->getClassConfig('Postman_Google_IO_Abstract')); $this->assertEquals(100, $config->getClassConfig('Postman_Google_IO_Abstract', 'request_timeout_seconds')); }
/** * @return string the name of the application */ public function getApplicationName() { return $this->config->getApplicationName(); }