spec\Sylius\Bundle\CoreBundle\Fixture\GeographicalFixtureSpec::it_creates_and_persist_a_country PHP Метод

it_creates_and_persist_a_country() публичный Метод

public it_creates_and_persist_a_country ( Sylius\Component\Resource\Factory\FactoryInterface $countryFactory, Doctrine\Common\Persistence\ObjectManager $countryManager, Sylius\Component\Addressing\Model\CountryInterface $country )
$countryFactory Sylius\Component\Resource\Factory\FactoryInterface
$countryManager Doctrine\Common\Persistence\ObjectManager
$country Sylius\Component\Addressing\Model\CountryInterface
    function it_creates_and_persist_a_country(FactoryInterface $countryFactory, ObjectManager $countryManager, CountryInterface $country)
    {
        $countryFactory->createNew()->willReturn($country);
        $country->setCode('PL')->shouldBeCalled();
        $country->enable()->shouldBeCalled();
        $countryManager->persist($country)->shouldBeCalled();
        $countryManager->flush()->shouldBeCalled();
        $this->load(['countries' => ['PL'], 'provinces' => [], 'zones' => []]);
    }