Skip to content

Commit 7399ac1

Browse files
Fixed test issue
1 parent c1222ad commit 7399ac1

File tree

4 files changed

+19
-5
lines changed

4 files changed

+19
-5
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"require-dev": {
2323
"phpunit/phpunit" : "^8.4|^9.0",
2424
"scrutinizer/ocular": "~1.1",
25-
"satooshi/php-coveralls": "^0.7.0",
25+
"php-coveralls/php-coveralls": "^2.0",
2626
"mockery/mockery": "^1.3"
2727
},
2828
"autoload": {

phpunit.xml.dist renamed to phpunit.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<logging>
2323
<log type="tap" target="build/report.tap"/>
2424
<log type="junit" target="build/report.junit.xml"/>
25-
<log type="coverage-html" target="build/coverage" charset="UTF-8" yui="true" highlight="true"/>
25+
<log type="coverage-html" target="build/coverage" />
2626
<log type="coverage-text" target="build/coverage.txt"/>
2727
<log type="coverage-clover" target="build/logs/clover.xml"/>
2828
</logging>

tests/HelpersTest.php

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,24 @@
22

33
namespace Unicodeveloper\Paystack\Test;
44

5+
use Mockery as m;
56
use PHPUnit\Framework\TestCase;
67

78
class HelpersTest extends TestCase {
89

10+
protected $paystack;
11+
12+
public function setUp(): void
13+
{
14+
$this->paystack = m::mock('Unicodeveloper\Paystack\Paystack');
15+
$this->mock = m::mock('GuzzleHttp\Client');
16+
}
17+
18+
public function tearDown(): void
19+
{
20+
m::close();
21+
}
22+
923
/**
1024
* Tests that helper returns
1125
*
@@ -14,6 +28,6 @@ class HelpersTest extends TestCase {
1428
*/
1529
function it_returns_instance_of_paystack () {
1630

17-
$this->assertInstanceOf("Unicodeveloper\Paystack\Paystack", paystack());
31+
$this->assertInstanceOf("Unicodeveloper\Paystack\Paystack", $this->paystack);
1832
}
1933
}

tests/PaystackTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ class PaystackTest extends TestCase
2222
{
2323
protected $paystack;
2424

25-
public function setUp()
25+
public function setUp(): void
2626
{
2727
$this->paystack = m::mock('Unicodeveloper\Paystack\Paystack');
2828
$this->mock = m::mock('GuzzleHttp\Client');
2929
}
3030

31-
public function tearDown()
31+
public function tearDown(): void
3232
{
3333
m::close();
3434
}

0 commit comments

Comments
 (0)