Sonata\BasketBundle\Tests\Form\ApiBasketTypeTest::testBuildForm PHP Метод

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

public testBuildForm ( )
    public function testBuildForm()
    {
        $currencyManager = $this->getMock('Sonata\\Component\\Currency\\CurrencyManagerInterface');
        $currencyDataTransformer = new CurrencyDataTransformer($currencyManager);
        $currencyFormType = new CurrencyFormType($currencyDataTransformer);
        $type = new ApiBasketType('my.test.class', $currencyFormType);
        $builder = $this->getMockBuilder('Symfony\\Component\\Form\\FormBuilder')->disableOriginalConstructor()->getMock();
        $builder->expects($this->once())->method('create')->will($this->returnSelf());
        $type->buildForm($builder, array());
    }
ApiBasketTypeTest