Completed
Push — master ( 6730ca...33ba9e )
by Ivannis Suárez
07:46
created

InMemoryLocatorTests::testCreate()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 18
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 18
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 8
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
12
namespace Cubiche\Core\Bus\Tests\Units\Middlewares\Handler\Locator;
13
14
use Cubiche\Core\Bus\Middlewares\Handler\Locator\InMemoryLocator;
15
use Cubiche\Core\Bus\Tests\Fixtures\Message\LoginUserMessage;
16
use Cubiche\Core\Bus\Tests\Fixtures\Message\LoginUserMessageListener;
17
18
/**
19
 * InMemoryLocator class.
20
 *
21
 * Generated by TestGenerator on 2016-04-07 at 15:40:41.
22
 */
23
class InMemoryLocatorTests extends LocatorTestCase
24
{
25
    /**
26
     * {@inheritdoc}
27
     */
28
    protected function createLocator()
29
    {
30
        return new InMemoryLocator();
31
    }
32
33
    /**
34
     * Test create.
35
     */
36
    public function testCreate()
37
    {
38
        parent::testCreate();
39
40
        $this
41
            ->given($handler = new LoginUserMessageListener())
42
            ->then()
43
//                ->exception(function () use ($handler) {
0 ignored issues
show
Unused Code Comprehensibility introduced by
57% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
44
//                    new InMemoryLocator([255 => $handler]);
45
//                })
46
//                ->isInstanceOf(\InvalidArgumentException::class)
47
                ->exception(function () use ($handler) {
48
                    new InMemoryLocator([LoginUserMessage::class => 255]);
49
                })
50
                ->isInstanceOf(\InvalidArgumentException::class)
51
52
        ;
53
    }
54
}
55