Exemplo n.º 1
0
 /**
  * @override
  * @return \ActiveResource\Connections\Connection
  */
 public static function getDefaultConnection()
 {
     if (null === self::$default_connection) {
         $shopify = Shopify::getInstance();
         if (!$shopify->hasAccessToken()) {
             throw new \InvalidArgumentException('access token missing');
         }
         self::$default_connection = $shopify->getConnection();
     }
     return self::$default_connection;
 }
Exemplo n.º 2
0
 public function test_contruct()
 {
     $shopify = new \cdyweb\Shopify\Shopify(json_decode(json_encode(array('shopname' => 'unit-test', 'scope' => array('read', 'write')))));
     $this->assertEquals($shopify, \cdyweb\Shopify\Shopify::getInstance());
 }