Completed
Push — master ( 1e5ff2...964092 )
by Андрей
02:39
created

dataEntryNameResolverMirrorFunctionalTest()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 6
rs 9.4285
cc 1
eloc 3
nc 1
nop 0
1
<?php
2
/**
3
 * @link    https://github.com/nnx-framework/entry-name-resolver
4
 * @author  Malofeykin Andrey  <[email protected]>
5
 */
6
namespace Nnx\EntryNameResolver\PhpUnit\Test;
7
8
use Nnx\EntryNameResolver\EntryNameResolverManagerInterface;
9
use Nnx\EntryNameResolver\PhpUnit\TestData\TestPaths;
10
use Zend\Test\PHPUnit\Controller\AbstractHttpControllerTestCase;
11
use Nnx\EntryNameResolver\EntryNameResolverMirror;
12
13
14
/**
15
 * Class EntryNameResolverMirrorFunctionalTest
16
 *
17
 * @package Nnx\EntryNameResolver\PhpUnit\Test
18
 */
19
class EntryNameResolverMirrorFunctionalTest extends AbstractHttpControllerTestCase
20
{
21
    /**
22
     * Данные для тестирования работы EntryNameResolverMirror
23
     *
24
     * @return array
25
     */
26
    public function dataEntryNameResolverMirrorFunctionalTest()
27
    {
28
        return [
29
            ['expectedEntry']
30
        ];
31
    }
32
33
    /**
34
     * Проверка работы EntryNameResolverMirror
35
     *
36
     * @dataProvider dataEntryNameResolverMirrorFunctionalTest
37
     *
38
     * @param $entryName
39
     *
40
     * @throws \Zend\Stdlib\Exception\LogicException
41
     * @throws \Zend\ServiceManager\Exception\ServiceNotFoundException
42
     */
43 View Code Duplication
    public function testEntryNameResolverMirror($entryName)
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
44
    {
45
        /** @noinspection PhpIncludeInspection */
46
        $this->setApplicationConfig(
47
            include TestPaths::getPathToContextResolverAppConfig()
48
        );
49
50
        /** @var EntryNameResolverManagerInterface $entryNameResolverManager */
51
        $entryNameResolverManager = $this->getApplicationServiceLocator()->get(EntryNameResolverManagerInterface::class);
52
53
        /** @var EntryNameResolverMirror $entryNameResolverMirror */
54
        $entryNameResolverMirror = $entryNameResolverManager->get(EntryNameResolverMirror::class);
55
56
        static::assertEquals($entryName, $entryNameResolverMirror->resolveEntryNameByContext($entryName));
57
    }
58
}
59