Example #1
0
 /**
  * @test
  */
 public function shouldAllowCreatePaymentWithStandardActionsAdded()
 {
     $payment = PaymentFactory::create();
     $this->assertInstanceOf('Payum\\Core\\Payment', $payment);
     $actions = $this->readAttribute($payment, 'actions');
     $this->assertInternalType('array', $actions);
     $this->assertNotEmpty($actions);
 }
    /**
     * @test
     */
    public function shouldConfigContainFactoryNameAndTitle()
    {
        $factory = new PaymentFactory();

        $config = $factory->createConfig();

        $this->assertInternalType('array', $config);

        $this->assertArrayHasKey('payum.factory_name', $config);
        $this->assertEquals('offline', $config['payum.factory_name']);

        $this->assertArrayHasKey('payum.factory_title', $config);
        $this->assertEquals('Offline', $config['payum.factory_title']);
    }