-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathPaystackTest.php
More file actions
54 lines (41 loc) · 1.26 KB
/
Copy pathPaystackTest.php
File metadata and controls
54 lines (41 loc) · 1.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<?php
declare(strict_types=1);
/*
* This file is part of the Laravel Paystack package.
*
* (c) Prosper Otemuyiwa <prosperotemuyiwa@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Xeviant\LaravelPaystack\Test;
use Mockery as m;
use PHPUnit\Framework\TestCase;
class PaystackTest extends TestCase
{
protected $paystack;
public function setUp()
{
$this->paystack = m::mock('Xeviant\Paystack\Paystack');
$this->mock = m::mock('GuzzleHttp\Client');
}
public function tearDown()
{
m::close();
}
public function testAllCustomersAreReturned()
{
$array = $this->paystack->shouldReceive('getAllCustomers')->andReturn(['prosper']);
$this->assertEquals('array', gettype([$array]));
}
public function testAllTransactionsAreReturned()
{
$array = $this->paystack->shouldReceive('getAllTransactions')->andReturn(['transactions']);
$this->assertEquals('array', gettype([$array]));
}
public function testAllPlansAreReturned()
{
$array = $this->paystack->shouldReceive('getAllPlans')->andReturn([]);
$this->assertEquals('array', gettype([$array]));
}
}