Completed
Push — locale-in-url ( 0f5e8a...c8ed20 )
by Kamil
20:36
created

OrderLocaleAssignerSpec   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 3
dl 0
loc 13
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A it_assigns_locale_to_an_order() 0 10 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\Component\Core\Order;
13
14
use PhpSpec\ObjectBehavior;
15
use Sylius\Component\Core\Model\OrderInterface;
16
use Sylius\Component\Locale\Context\LocaleContextInterface;
17
18
/**
19
 * @author Kamil Kokot <[email protected]>
20
 */
21
final class OrderLocaleAssignerSpec extends ObjectBehavior
22
{
23
    function it_assigns_locale_to_an_order(LocaleContextInterface $localeContext, OrderInterface $order)
24
    {
25
        $this->beConstructedWith($localeContext);
26
27
        $localeContext->getLocaleCode()->willReturn('pl_PL');
28
29
        $order->setLocaleCode('pl_PL')->shouldBeCalled();
30
31
        $this->assignLocale($order);
32
    }
33
}
34