Sonata\Tests\Component\Basket\BasketElementTest::testOptions PHP Method

testOptions() public method

public testOptions ( )
    public function testOptions()
    {
        $basketElement = $this->getBasketElement();
        $this->assertEquals(true, $basketElement->hasOption('option1'), 'BasketElement has one option : option1');
        $this->assertEquals(false, $basketElement->hasOption('fake'), 'BasketElement has not option : fake');
        $this->assertEquals('toto', $basketElement->getOption('option1'), 'option1 option = toto');
        $this->assertEquals(null, $basketElement->getOption('fake'), 'fake option = null');
    }