Passed
Push — master ( 05909f...99f62c )
by Alex
08:00
created

NonAsciiCharsUnitTestClass::actionRoute()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
rs 10
cc 1
nc 1
nop 0
1
<?php
2
declare(strict_types = 1);
3
namespace Mezon\Router\Tests\Base;
4
5
/**
6
 *
7
 * @psalm-suppress PropertyNotSetInConstructor
8
 */
9
abstract class NonAsciiCharsUnitTestClass extends BaseRouterUnitTestClass
10
{
11
12
    /**
13
     * Some action
14
     *
15
     * @return int
16
     */
17
    public function actionRoute(): int
18
    {
19
        return 1;
20
    }
21
22
    /**
23
     * Testing callig non-ASCII char route
24
     */
25
    public function testCallNonAsciiCharRoute(): void
26
    {
27
        // setup
28
        $router = $this->getRouter();
29
        RouterUnitTestUtils::setRequestMethod('GET');
30
31
        // test body
32
        $router->addGetRoute('кириллический-урл', $this, 'actionRoute');
33
34
        // assertions
35
        $this->assertEquals(1, $router->callRoute(urlencode('кириллический-урл')));
36
    }
37
38
/**
39
 * Testing getting non-ASCII char route
40
 */
41
    // public function testGetNonAsciiCharRoute(): void
42
    // {
43
    // setup
44
    // test body
45
    // assertions
46
    // }
47
}
48