Completed
Push — remove-content-bundle ( 201341 )
by Kamil
34:43
created

CompleteCheckoutCallbackSpec   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 2
dl 0
loc 14
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A it_is_initializable() 0 4 1
A it_completes_an_order() 0 6 1
1
<?php
2
3
/*
4
 * This file is part of the Sylius package.
5
 *
6
 * (c) Paweł Jędrzejewski
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 spec\Sylius\Bundle\OrderBundle\StateMachineCallback;
13
14
use PhpSpec\ObjectBehavior;
15
use Sylius\Bundle\OrderBundle\StateMachineCallback\CompleteCheckoutCallback;
16
use Sylius\Component\Order\Model\OrderInterface;
17
18
final class CompleteCheckoutCallbackSpec extends ObjectBehavior
19
{
20
    function it_is_initializable()
21
    {
22
        $this->shouldHaveType(CompleteCheckoutCallback::class);
23
    }
24
25
    function it_completes_an_order(OrderInterface $order)
26
    {
27
        $order->completeCheckout()->shouldBeCalled();
28
29
        $this->completeCheckout($order);
30
    }
31
}
32