cubiche /
bus
These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
| 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\Bus\Tests\Units\Middlewares\Handler\Resolver\HandlerMethodName; |
||
| 12 | |||
| 13 | use Cubiche\Core\Bus\Middlewares\Handler\Resolver\HandlerMethodName\DefaultResolver; |
||
| 14 | use Cubiche\Core\Bus\Tests\Fixtures\Command\LoginUserCommand; |
||
| 15 | use Cubiche\Core\Bus\Tests\Units\TestCase; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * DefaultResolver class. |
||
| 19 | * |
||
| 20 | * Generated by TestGenerator on 2016-04-07 at 15:40:41. |
||
| 21 | */ |
||
| 22 | View Code Duplication | class DefaultResolverTests extends TestCase |
|
|
0 ignored issues
–
show
|
|||
| 23 | { |
||
| 24 | /** |
||
| 25 | * Test Resolve method. |
||
| 26 | */ |
||
| 27 | public function testResolve() |
||
| 28 | { |
||
| 29 | $this |
||
| 30 | ->given($resolver = new DefaultResolver()) |
||
| 31 | ->when($result = $resolver->resolve(LoginUserCommand::class)) |
||
| 32 | ->then() |
||
| 33 | ->string($result) |
||
| 34 | ->isEqualTo('handle') |
||
| 35 | ; |
||
| 36 | } |
||
| 37 | } |
||
| 38 |
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.