Skip to content
This repository has been archived by the owner on Mar 16, 2024. It is now read-only.

Commit

Permalink
support moip v1.3.*
Browse files Browse the repository at this point in the history
  • Loading branch information
SOSTheBlack committed Aug 14, 2017
1 parent 787c0aa commit 5bceb72
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 21 deletions.
30 changes: 30 additions & 0 deletions src/Moip.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,16 @@ public function start()
return $this;
}

/**
* Create a new Accounts instance.
*
* @return \Moip\Resource\Account
*/
public function accounts()
{
return $this->moip->accounts();
}

/**
* Create a new Customer instance.
*
Expand Down Expand Up @@ -99,4 +109,24 @@ public function multiorders()
{
return $this->moip->multiorders();
}

/**
* Create a new Notifications instance.
*
* @return \Moip\Resource\NotificationPreferences
*/
public function notifications()
{
return $this->moip->notifications();
}

/**
* Create a new Tranfers instance.
*
* @return \Moip\Resource\Transfers
*/
public function transfers()
{
return $this->moip->transfers();
}
}
36 changes: 15 additions & 21 deletions tests/src/MoipTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,59 +9,53 @@
*/
class MoipTest extends AbstractTestCase
{
/**
* @test
*/
public function testStart()
{
$this->assertInstanceOf(\Artesaos\Moip\Moip::class, $this->moip->start());
}

/**
* @test
*/
public function testPropertyMoip()
{
$this->assertInstanceOf(\Moip\Moip::class, $this->moip->getApi());
}

/**
* @test
*/
public function testInstanceOfAccount()
{
$this->assertInstanceOf(\Moip\Resource\Account::class, $this->moip->accounts());
}

public function testInstanceOfCustomers()
{
$this->assertInstanceOf(\Moip\Resource\Customer::class, $this->moip->customers());
}

/**
* @test
*/
public function testInstanceOfEntries()
{
$this->assertInstanceOf(\Moip\Resource\Entry::class, $this->moip->entries());
}

/**
* @test
*/
public function testInstanceOfOrders()
{
$this->assertInstanceOf(\Moip\Resource\Orders::class, $this->moip->orders());
}

/**
* @test
*/
public function testInstanceOfPayments()
{
$this->assertInstanceOf(\Moip\Resource\Payment::class, $this->moip->payments());
}

/**
* @test
*/
public function testInstanceOfMultiOrders()
{
$this->assertInstanceOf(\Moip\Resource\Multiorders::class, $this->moip->multiorders());
}

public function testInstanceOfNotifications()
{
$this->assertInstanceOf(\Moip\Resource\NotificationPreferences::class, $this->moip->notifications());
}

public function testeInstanceOfTranfers()
{
$this->assertInstanceOf(\Moip\Resource\Transfers::class, $this->moip->transfers());
}
}

0 comments on commit 5bceb72

Please sign in to comment.