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

ShopifyAPIComponentTest   A

Complexity

Total Complexity 9

Size/Duplication

Total Lines 55
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 7

Importance

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

9 Methods

Rating   Name   Duplication   Size   Complexity  
A setUp() 0 13 1
A tearDown() 0 4 1
A testSetShopDomain() 0 4 1
A testGetShopDomain() 0 3 1
A testSetAccessToken() 0 3 1
A testGetAuthorizeUrl() 0 3 1
A testGetAccessToken() 0 3 1
A testSetNonce() 0 3 1
A testGetNonce() 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\Component;
17
18
use Multidimensional\Shopify\Controller\Component\ShopifyAPIComponent;
19
20
use Cake\Controller\Controller;
21
use Cake\Controller\ComponentRegistry;
22
use Cake\Event\Event;
23
use Cake\Network\Request;
24
use Cake\Network\Response;
25
use Cake\TestSuite\TestCase;
26
27
class ShopifyAPIComponentTest extends TestCase {
28
 
29
     public $component = null;
30
     public $controller = null;
31
     public $fixtures = ['plugin.Multidimensional/Shopify.Shops', 'plugin.Multidimensional/Shopify.AccessTokens'];
32
 
33
     public function setUp() {
34
        parent::setUp();
35
        $request = new Request();
36
        $response = new Response();
37
        $this->controller = $this->getMockBuilder('Cake\Controller\Controller')
38
            ->setConstructorArgs([$request, $response])
39
            ->setMethods(null)
40
            ->getMock();
41
        $registry = new ComponentRegistry($this->controller);
42
        $this->component = new ShopifyAPIComponent($registry);
43
        $event = new Event('Controller.startup', $this->controller);
44
        $this->component->startup($event);
45
    }
46
    
47
    public function tearDown() {
48
        parent::tearDown();
49
        unset($this->component, $this->controller);
50
    }
51
    
52
    public function testSetShopDomain() {
53
        
54
        
55
    }
56
    
57
    public function testGetShopDomain() {
58
        
59
    }
60
    
61
    public function testSetAccessToken() {
62
        
63
    }
64
    
65
    public function testGetAuthorizeUrl() {
66
        
67
    }
68
    
69
    public function testGetAccessToken() {
70
        
71
    }
72
    
73
    public function testSetNonce() {
74
        
75
    }
76
    
77
    public function testGetNonce() {
78
        
79
    }
80
 
81
}
82