Completed
Branch testing (566e23)
by AJ
01:58
created

InstallControllerTest   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 4
Bugs 0 Features 0
Metric Value
wmc 4
c 4
b 0
f 0
lcom 1
cbo 1
dl 0
loc 26
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A setUp() 0 3 1
A testValidate() 0 6 1
A testIndex() 0 4 1
A testRedirect() 0 3 1
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