/** * @test */ public function shouldAllowCreatePaymentWithStandardActionsAddedPlusAgreementAndRecurringOnes() { $orderApiMock = $this->createOrderApiMock(); $agreementApiMock = $this->createAgreementApiMock(); $recurringApiMock = $this->createRecurringApiMock(); $payment = PaymentFactory::create($orderApiMock, $agreementApiMock, $recurringApiMock); $this->assertInstanceOf('Payum\\Core\\Payment', $payment); $this->assertAttributeCount(3, 'apis', $payment); $actions = $this->readAttribute($payment, 'actions'); $this->assertInternalType('array', $actions); $this->assertCount(17, $actions); }
/** * @test * * @expectedException \Payum\Core\Exception\LogicException * @expectedExceptionMessage The account_number, encryption_key fields are required. */ public function shouldThrowIfRequiredOptionsNotPassed() { $factory = new PaymentFactory(); $factory->create(); }