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\Shopify\Tests\Controller; |
17
|
|
|
|
18
|
|
|
use Multidimensional\Shopify\Controller\InstallController; |
19
|
|
|
|
20
|
|
|
use Cake\TestSuite\IntegrationTestCase; |
21
|
|
|
|
22
|
|
|
class InstallControllerTest extends IntegrationTestCase { |
23
|
|
|
|
24
|
|
|
public $fixtures = ['plugin.Multidimensional/Shopify.Shops', |
25
|
|
|
'plugin.Multidimensional/Shopify.AccessTokens']; |
26
|
|
|
|
27
|
|
|
public function setUp() { |
28
|
|
|
parent::setUp(); |
29
|
|
|
} |
30
|
|
|
|
31
|
|
|
public function testValidate() { |
32
|
|
|
$this->get('/shopify/install/'); |
33
|
|
|
$this->assertResponseOk(); |
34
|
|
|
$this->get('/shopify/' . md5(rand(1,10)) . '/install/'); |
35
|
|
|
$this->assertResponseError(); |
36
|
|
|
} |
37
|
|
|
|
38
|
|
|
public function testIndex() { |
39
|
|
|
$this->get('/shopify/install/'); |
40
|
|
|
$this->assertResponseOk(); |
41
|
|
|
} |
42
|
|
|
|
43
|
|
|
public function testRedirect() { |
44
|
|
|
|
45
|
|
|
} |
46
|
|
|
|
47
|
|
|
} |
48
|
|
|
|