Sonata\Tests\Component\Payment\SelectorTest::testGetPaymentException PHP Method

testGetPaymentException() public method

    public function testGetPaymentException()
    {
        $paymentPoolMethods = array('first method', 'second method');
        $paymentPool = $this->getMockBuilder('Sonata\\Component\\Payment\\Pool')->getMock();
        $paymentPool->expects($this->any())->method('getMethods')->will($this->returnValue($paymentPoolMethods));
        $productPool = $this->getMockBuilder('Sonata\\Component\\Product\\Pool')->getMock();
        $selector = new Selector($paymentPool, $productPool);
        $selector->getPayment('not_existing');
    }