Completed
Push — master ( 650d31...1f25f1 )
by AJ
02:01
created

SubdomainRouteTest::testParse()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 9
rs 9.6666
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
/**
3
 * CakePHP Plugin : CakePHP Subdomain Routing
4
 * Copyright (c) Multidimension.al (http://multidimension.al)
5
 * Github : https://github.com/multidimension-al/cakephp-subdomains
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/cakephp-subdomains Github
13
 * @license   http://www.opensource.org/licenses/mit-license.php MIT License
14
 */
15
16
namespace Multidimensional\Subdomains\Tests\TestCase\Routing\Route;
17
18
use Cake\Core\Configure;
19
use Cake\Network\Request;
20
use Cake\Routing\Route\Route;
21
use Cake\Routing\Router;
22
use Cake\TestSuite\TestCase;
23
use Multidimensional\Subdomains\Middleware\SubdomainMiddleware;
24
use Multidimensional\Subdomains\Routing\Route\SubdomainRoute;
25
26
class SubdomainRouteTest extends TestCase
27
{
28
29
    private $SubdomainRoute;
0 ignored issues
show
Coding Style introduced by
$SubdomainRoute does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
30
    
31
    /**
32
     * @return void
33
     */
34
    public function setUp()
35
    {
36
        parent::setUp();
37
        Configure::write('Multidimensional/Subdomains.Subdomains', ['admin']);
38
        $this->SubdomainRoute = new SubdomainRoute();
0 ignored issues
show
Bug introduced by
The call to SubdomainRoute::__construct() misses a required argument $template.

This check looks for function calls that miss required arguments.

Loading history...
39
    }
40
    
41
    /**
42
     * @return void
43
     */
44
    public function tearDown()
45
    {
46
        unset($this->SubdomainRoute);
47
    }
48
49
    /**
50
     * @return void
51
     */
52
    public function testParse() {
53
        $this->markTestIncomplete('Not implemented yet.');
54
        /*$url = ['prefix' => 'admin', 'Controller' => 'pages', 'action' => 'index'];
55
        $response = $this->SubdomainRoute->parse($url, '');
56
        //assertSame
57
        $url = ['prefix' => 'users', 'Controller' => 'pages', 'action' => 'index'];
58
        $response = $this->SubdomainRoute->parse($url, '');
59
        //assertwrong*/
60
     }
61
    
62
    /**
63
     * @return void
64
     */
65
    public function testMatch() {
66
        $this->markTestIncomplete('Not implemented yet.');
67
        /*$url = ['prefix' => 'admin', 'Controller' => 'pages', 'action' => 'index'];
68
        $response = $this->SubdomainRoute->match($url, '');
69
        //assertSame
70
        $url = ['prefix' => 'users', 'Controller' => 'pages', 'action' => 'index'];
71
        $response = $this->SubdomainRoute->match($url, '');
72
        //assertwrong*/
73
    }
74
    
75
}
76