Completed
Push — master ( 294fc5...650d31 )
by AJ
04:35
created

SubdomainRouteTest::tearDown()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 4
rs 10
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 Multidimensional\Subdomains\Middleware\SubdomainMiddleware;
19
use Multidimensional\Subdomains\Routing\Route\SubdomainRoute;
20
21
use Cake\Routing\Router;
22
use Cake\Network\Request;
23
use Cake\Routing\Route\Route;
24
use Cake\TestSuite\TestCase;
25
use Cake\Core\Configure;
26
27
class SubdomainRouteTest extends TestCase
28
{
29
30
    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...
31
32
    public function setUp()
33
    {
34
        parent::setUp();
35
        Configure::write('Multidimensional/Subdomains.Subdomains', ['admin']);
36
        $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...
37
    }
38
39
    public function tearDown()
40
    {
41
        unset($this->SubdomainRoute);
42
    }
43
44
    /**
45
    * @return void
46
    */
47
    /* public function testParse() {
48
     *
49
     *   $url = ['prefix' => 'admin', 'Controller' => 'pages', 'action' => 'index'];
50
     *   $response = $this->SubdomainRoute->parse($url, '');
51
     *   //assertSame
52
     *   $url = ['prefix' => 'users', 'Controller' => 'pages', 'action' => 'index'];
53
     *   $response = $this->SubdomainRoute->parse($url, '');
54
     *   //assertwrong
55
     *
56
     * }
57
     */
58
    /**
59
    * @return void
60
    */
61
    /* public function testMatch() {
62
     *
63
     *   $url = ['prefix' => 'admin', 'Controller' => 'pages', 'action' => 'index'];
64
     *  $response = $this->SubdomainRoute->match($url, '');
65
     *   //assertSame
66
     *   $url = ['prefix' => 'users', 'Controller' => 'pages', 'action' => 'index'];
67
     *   $response = $this->SubdomainRoute->match($url, '');
68
     *   //assertwrong
69
     *
70
     * }
71
     */
72
}
73