Skip to content

Commit

Permalink
add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
makasim committed Dec 20, 2014
1 parent 3992570 commit 5271c84
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions Tests/PaymentFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,37 @@ public function shouldAllowCreatePayment()
$this->assertAttributeNotEmpty('extensions', $extensions);
}

/**
* @test
*/
public function shouldAllowCreatePaymentWithCustomApi()
{
$factory = new PaymentFactory();

$payment = $factory->create(array('payum.api' => new \stdClass()));

$this->assertInstanceOf('Payum\Core\Payment', $payment);

$this->assertAttributeNotEmpty('apis', $payment);
$this->assertAttributeNotEmpty('actions', $payment);

$extensions = $this->readAttribute($payment, 'extensions');
$this->assertAttributeNotEmpty('extensions', $extensions);
}

/**
* @test
*/
public function shouldAllowCreatePaymentConfig()
{
$factory = new PaymentFactory();

$config = $factory->createConfig();

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

/**
* @test
*
Expand Down

0 comments on commit 5271c84

Please sign in to comment.