Sonata\Tests\Component\Basket\BaseBasketFactoryTest::testConstruct PHP Method

testConstruct() public method

public testConstruct ( )
    public function testConstruct()
    {
        $basketManager = $this->getMock('Sonata\\Component\\Basket\\BasketManagerInterface');
        $basketBuilder = $this->getMock('Sonata\\Component\\Basket\\BasketBuilderInterface');
        $currencyDetector = $this->getMock('Sonata\\Component\\Currency\\CurrencyDetectorInterface');
        $session = $this->getMockBuilder('Symfony\\Component\\HttpFoundation\\Session\\Session')->disableOriginalConstructor()->getMock();
        $basketFactory = new BasketFactory($basketManager, $basketBuilder, $currencyDetector, $session);
        $this->assertEquals($basketManager, $basketFactory->getBasketManager());
        $this->assertEquals($basketBuilder, $basketFactory->getBasketBuilder());
        $this->assertEquals($currencyDetector, $basketFactory->getCurrencyDetector());
        $this->assertEquals($session, $basketFactory->getSession());
    }
BaseBasketFactoryTest