FromClassNameResolverTests::testResolve()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 7

Duplication

Lines 10
Ratio 100 %

Importance

Changes 0
Metric Value
dl 10
loc 10
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 7
nc 1
nop 0
1
<?php
2
3
/**
4
 * This file is part of the Cubiche package.
5
 *
6
 * Copyright (c) Cubiche
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
namespace Cubiche\Core\Cqrs\Tests\Units\Middlewares\Handler\Resolver\NameOfQuery;
12
13
use Cubiche\Core\Cqrs\Middlewares\Handler\Resolver\NameOfQuery\FromClassNameResolver;
14
use Cubiche\Core\Cqrs\Tests\Fixtures\Query\PublishedPostsQuery;
15
use Cubiche\Core\Cqrs\Tests\Units\TestCase;
16
17
/**
18
 * FromClassNameResolver class.
19
 *
20
 * Generated by TestGenerator on 2016-04-07 at 15:40:41.
21
 */
22
class FromClassNameResolverTests extends TestCase
23
{
24
    /**
25
     * Test Resolve method.
26
     */
27 View Code Duplication
    public function testResolve()
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...
28
    {
29
        $this
30
            ->given($resolver = new FromClassNameResolver())
31
            ->when($result = $resolver->resolve(new PublishedPostsQuery(new \DateTime())))
32
            ->then()
33
                ->string($result)
34
                    ->isEqualTo(PublishedPostsQuery::class)
35
        ;
36
    }
37
}
38