Пример #1
0
 /**
  * @test
  */
 public function shouldAllowCreatePaymentWithStandardActionsAndCustomRenderTemplateAction()
 {
     $connectorMock = $this->createConnectorMock();
     $payment = PaymentFactory::create($connectorMock, $this->getMock('Payum\\Core\\Action\\ActionInterface'), 'aLayout', 'aTemplate');
     $this->assertInstanceOf('Payum\\Core\\Payment', $payment);
     $this->assertAttributeCount(1, 'apis', $payment);
     $actions = $this->readAttribute($payment, 'actions');
     $this->assertInternalType('array', $actions);
     $this->assertAttributeCount(6, 'actions', $payment);
 }
Пример #2
0
    /**
     * @test
     *
     * @expectedException \Payum\Core\Exception\LogicException
     * @expectedExceptionMessage The merchant_id, secret fields are required.
     */
    public function shouldThrowIfRequiredOptionsNotPassed()
    {
        $factory = new PaymentFactory();

        $factory->create();
    }