Test Setup Failed
Push — master ( 89d4a6...423952 )
by Gabriel
01:49
created

UrlGeneratorTraitTest::testRegisterRouter()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 11

Duplication

Lines 11
Ratio 100 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 11
loc 11
rs 9.9
c 0
b 0
f 0
1
<?php
2
3
namespace Nip\Router\Tests\ServiceProvider\Traits;
4
5
use Nip\Container\Container;
6
use Nip\Router\Generator\UrlGenerator;
7
use Nip\Router\RouteCollection;
8
use Nip\Router\RouterServiceProvider;
9
use Nip\Router\Tests\AbstractTest;
10
11
/**
12
 * Class UrlGeneratorTraitTest
13
 * @package Nip\Router\Tests\ServiceProvider\Traits
14
 */
15 View Code Duplication
class UrlGeneratorTraitTest extends AbstractTest
0 ignored issues
show
Duplication introduced by
This class 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...
16
{
17
    public function testRegisterRouter()
18
    {
19
        $container = new Container();
20
        $container->set('routes', new RouteCollection());
21
22
        $provider = new RouterServiceProvider();
23
        $provider->setContainer($container);
24
        $provider->registerUrlGenerator();
25
26
        self::assertInstanceOf(UrlGenerator::class, $container->get('url'));
27
    }
28
}