Sonata\Tests\Component\Transformer\BasketTransformerTest::testInvalidPaymentMethod PHP Method

testInvalidPaymentMethod() public method

    public function testInvalidPaymentMethod()
    {
        $this->setExpectedException('RuntimeException', 'Invalid payment method');
        $basket = new Basket();
        $customer = $this->getMock('Sonata\\Component\\Customer\\CustomerInterface');
        $billingAddress = $this->getMock('Sonata\\Component\\Customer\\AddressInterface');
        $currency = new Currency();
        $currency->setLabel('EUR');
        $basket->setCurrency($currency);
        $basket->setCustomer($customer);
        $basket->setBillingAddress($billingAddress);
        $this->getBasketTransform()->transformIntoOrder($basket);
    }