1
|
|
|
<?php |
2
|
|
|
/** |
3
|
|
|
* CakePHPify : CakePHP Plugin for Shopify API Authentication |
4
|
|
|
* Copyright (c) Multidimension.al (http://multidimension.al) |
5
|
|
|
* Github : https://github.com/multidimension-al/cakephpify |
6
|
|
|
* |
7
|
|
|
* Licensed under The MIT License |
8
|
|
|
* For full copyright and license information, please see the LICENSE file |
9
|
|
|
* Redistributions of files must retain the above copyright notice. |
10
|
|
|
* |
11
|
|
|
* @copyright (c) Multidimension.al (http://multidimension.al) |
12
|
|
|
* @link https://github.com/multidimension-al/cakephpify CakePHPify Github |
13
|
|
|
* @license http://www.opensource.org/licenses/mit-license.php MIT License |
14
|
|
|
*/ |
15
|
|
|
|
16
|
|
|
namespace Multidimensional\Cakephpify\Test\TestCase\Controller\Component; |
17
|
|
|
|
18
|
|
|
use Multidimensional\Cakephpify\Controller\Component\ShopifyAPIComponent; |
19
|
|
|
|
20
|
|
|
use Multidimensional\Cakephpify\Test\Fixture\ShopsFixture; |
21
|
|
|
use Multidimensional\Cakephpify\Test\Fixture\AccessTokensFixture; |
22
|
|
|
|
23
|
|
|
use Cake\Controller\Controller; |
24
|
|
|
use Cake\Controller\ComponentRegistry; |
25
|
|
|
use Cake\Event\Event; |
26
|
|
|
use Cake\Network\Request; |
27
|
|
|
use Cake\Network\Response; |
28
|
|
|
use Cake\TestSuite\TestCase; |
29
|
|
|
|
30
|
|
|
class ShopifyAPIComponentTest extends TestCase |
31
|
|
|
{ |
32
|
|
|
|
33
|
|
|
public $component = null; |
34
|
|
|
public $controller = null; |
35
|
|
|
public $fixtures = ['plugin.Multidimensional/Cakephpify.Shops', 'plugin.Multidimensional/Cakephpify.AccessTokens']; |
36
|
|
|
|
37
|
|
|
public function setUp() |
38
|
|
|
{ |
39
|
|
|
parent::setUp(); |
40
|
|
|
$request = new Request(); |
41
|
|
|
$response = new Response(); |
42
|
|
|
$this->controller = $this->getMockBuilder('Cake\Controller\Controller') |
43
|
|
|
->setConstructorArgs([$request, $response]) |
44
|
|
|
->setMethods(null) |
45
|
|
|
->getMock(); |
46
|
|
|
$registry = new ComponentRegistry($this->controller); |
47
|
|
|
$this->component = new ShopifyAPIComponent($registry); |
48
|
|
|
$event = new Event('Controller.startup', $this->controller); |
49
|
|
|
$this->component->startup($event); |
50
|
|
|
} |
51
|
|
|
|
52
|
|
|
public function tearDown() |
53
|
|
|
{ |
54
|
|
|
parent::tearDown(); |
55
|
|
|
unset($this->component, $this->controller); |
56
|
|
|
} |
57
|
|
|
|
58
|
|
|
public function testSetShopDomain() |
59
|
|
|
{ |
60
|
|
|
$this->markTestIncomplete('Not implemented yet.'); |
61
|
|
|
} |
62
|
|
|
|
63
|
|
|
public function testGetShopDomain() |
64
|
|
|
{ |
65
|
|
|
$this->markTestIncomplete('Not implemented yet.'); |
66
|
|
|
} |
67
|
|
|
|
68
|
|
|
public function testSetAccessToken() |
69
|
|
|
{ |
70
|
|
|
$this->markTestIncomplete('Not implemented yet.'); |
71
|
|
|
} |
72
|
|
|
|
73
|
|
|
public function testGetAuthorizeUrl() |
74
|
|
|
{ |
75
|
|
|
$this->markTestIncomplete('Not implemented yet.'); |
76
|
|
|
} |
77
|
|
|
|
78
|
|
|
public function testGetAccessToken() |
79
|
|
|
{ |
80
|
|
|
$this->markTestIncomplete('Not implemented yet.'); |
81
|
|
|
} |
82
|
|
|
|
83
|
|
|
public function testSetNonce() |
84
|
|
|
{ |
85
|
|
|
$this->markTestIncomplete('Not implemented yet.'); |
86
|
|
|
} |
87
|
|
|
|
88
|
|
|
public function testGetNonce() |
89
|
|
|
{ |
90
|
|
|
$this->markTestIncomplete('Not implemented yet.'); |
91
|
|
|
} |
92
|
|
|
} |
93
|
|
|
|