Passed
Push — master ( c2b6eb...8c3bb9 )
by Sébastien
09:25
created

ResetServicesTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Importance

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

1 Method

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