ResetServicesTest   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 8
c 1
b 0
f 0
dl 0
loc 14
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A testReceiveResetServices() 0 12 1
1
<?php
2
3
namespace Bdf\QueueBundle\Tests\Consumption\Receiver;
4
5
use Bdf\Queue\Consumer\Receiver\NextInterface;
6
use Bdf\QueueBundle\Consumption\Receiver\ResetServices;
7
use PHPUnit\Framework\TestCase;
8
use Symfony\Component\HttpKernel\DependencyInjection\ServicesResetter;
9
10
class ResetServicesTest extends TestCase
11
{
12
    public function testReceiveResetServices()
13
    {
14
        $message = new \stdClass();
15
16
        $resetter = $this->createMock(ServicesResetter::class);
17
        $resetter->expects($this->once())->method('reset');
18
19
        $next = $this->createMock(NextInterface::class);
20
        $next->expects($this->once())->method('receive')->with($message, $next);
21
22
        $receiver = new ResetServices($resetter);
23
        $receiver->receive($message, $next);
24
    }
25
}
26