Sonata\Tests\Component\Payment\PaypalTest::testSendbank PHP Method

testSendbank() public method

public testSendbank ( )
    public function testSendbank()
    {
        $router = $this->getMock('Symfony\\Component\\Routing\\RouterInterface');
        $translator = $this->getMock('Symfony\\Component\\Translation\\TranslatorInterface');
        $paypal = new Paypal($router, $translator);
        $options = array('cert_file' => __DIR__ . '/PaypalTestFiles/cert_file', 'key_file' => __DIR__ . '/PaypalTestFiles/key_file', 'paypal_cert_file' => __DIR__ . '/PaypalTestFiles/paypal_cert_file', 'openssl' => __DIR__ . '/PaypalTestFiles/openssl');
        $paypal->setOptions($options);
        $order = $this->getMock('Sonata\\Component\\Order\\OrderInterface');
        $order->expects($this->any())->method('getCreatedAt')->will($this->returnValue(new \DateTime()));
        $sendbank = $paypal->sendbank($order);
        $this->assertInstanceOf('Symfony\\Component\\HttpFoundation\\Response', $sendbank);
        $this->assertContains('<input type="hidden" name="cmd" value="_s-xclick">', $sendbank->getContent());
    }