Skip to content
Browse files

Reorganised tests folder

  • Loading branch information...
1 parent 38b853f commit 804324f58c3b2bec19973fa6e23e2f6105c11d3a @DHS DHS committed Mar 27, 2012
View
2 phpunit.xml
@@ -3,7 +3,7 @@
<phpunit colors="true" stopOnFailure="false" bootstrap="tests/bootstrap.php">
<testsuites>
<testsuite name="lib">
- <directory suffix=".php">./tests/lib</directory>
+ <directory>./tests</directory>
</testsuite>
</testsuites>
</phpunit>
View
25 tests/gocardless.php → tests/GoCardlessTest.php
@@ -4,24 +4,27 @@ class Test_GoCardless extends PHPUnit_Framework_TestCase {
public function setUp() {
-
+ $this->config = array(
+ 'app_id' => 'abc',
+ 'app_secret' => 'xyz',
+ 'access_token' => 'foo',
+ );
}
+ /**
+ * Test that set_account_details creates an instance of client
+ */
+ public function testSetAccountDetailsCreatesClient() {
+
+ // Use sandbox
+ GoCardless::$environment = 'sandbox';
- public function testAccountDetails()
- {
// Initialize GoCardless
- GoCardless::set_account_details(array(
- 'app_id' => 'X',
- 'app_secret' => 'X',
- 'merchant_id' => 1,
- 'access_token' => 'X',
- ));
+ GoCardless::set_account_details($this->config);
- $class = get_class(GoCardless::$client);
+ $this->assertInstanceOf('GoCardless_Client', GoCardless::$client);
- $this->assertEquals('GoCardless_Client', $class);
}
/*
View
0 tests/lib/bill.php → tests/lib/BillTest.php
File renamed without changes.
View
0 tests/lib/client.php → tests/lib/ClientTest.php
File renamed without changes.
View
0 tests/lib/merchant.php → tests/lib/MerchantTest.php
File renamed without changes.
View
0 tests/lib/preauthorization.php → tests/lib/PreAuthorizationTest.php
File renamed without changes.
View
0 tests/lib/subscription.php → tests/lib/SubscriptionTest.php
File renamed without changes.
View
0 tests/lib/utils.php → tests/lib/UtilsTest.php
File renamed without changes.

0 comments on commit 804324f

Please sign in to comment.
Something went wrong with that request. Please try again.