Exemplo n.º 1
0
 /**
  * SetUpBerofeClass
  */
 public static function setUpBeforeClass()
 {
     if (!constant('TESTS_ZEND_SERVICE_GOGRID_ONLINE_ENABLED')) {
         self::markTestSkipped('Zend\\Service\\GoGrid online tests are not enabled');
     }
     if (!defined('TESTS_ZEND_SERVICE_GOGRID_ONLINE_KEY') || !defined('TESTS_ZEND_SERVICE_GOGRID_ONLINE_SECRET')) {
         self::markTestSkipped('Constants Key and Secret have to be set.');
     }
     self::$gogrid = new Server(TESTS_ZEND_SERVICE_GOGRID_ONLINE_KEY, TESTS_ZEND_SERVICE_GOGRID_ONLINE_SECRET);
     self::$httpClientAdapterSocket = new \Zend\Http\Client\Adapter\Socket();
     self::$gogrid->getHttpClient()->setAdapter(self::$httpClientAdapterSocket);
 }
Exemplo n.º 2
0
 /**
  * Sets up this test case
  *
  * @return void
  */
 public function setUp()
 {
     if (!defined('TESTS_ZEND_SERVICE_GOGRID_ONLINE_ENABLED') || TESTS_ZEND_SERVICE_GOGRID_ONLINE_ENABLED != true) {
         $this->markTestSkipped('Zend\\Service\\GoGrid online tests are not enabled');
     }
     if (!defined('TESTS_ZEND_SERVICE_GOGRID_ONLINE_KEY') || !defined('TESTS_ZEND_SERVICE_GOGRID_ONLINE_SECRET')) {
         $this->markTestSkipped('Constants Key and Secret have to be set.');
     }
     $this->gogrid = new Server(TESTS_ZEND_SERVICE_GOGRID_ONLINE_KEY, TESTS_ZEND_SERVICE_GOGRID_ONLINE_SECRET);
     $this->httpClientAdapterSocket = new \Zend\Http\Client\Adapter\Socket();
     $this->gogrid->getHttpClient()->setAdapter($this->httpClientAdapterSocket);
     // terms of use compliance: safe delay between each test
     sleep(10);
 }