Skip to content

Commit

Permalink
Update CashIDServiceTest.php
Browse files Browse the repository at this point in the history
  • Loading branch information
Beakerboy committed Aug 19, 2019
1 parent a59af34 commit ea7f3cb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/Unit/CashIDServiceTest.php
Expand Up @@ -4,6 +4,7 @@

use CashID\Exceptions\CashIDException;
use CashID\Services\RequestGenerator;
use Paillechat\ApcuSimpleCache\ApcuCache;

/**
* Test the CashIDService class
Expand All @@ -19,11 +20,13 @@ class CashIDServiceTest extends \PHPUnit\Framework\TestCase
*/
public function testCreateRequest($non_dependency)
{
$cache = new ApcuCache();

// The RequestGenerator does not have a dependency for the provided item
$this->expectException(CashIDException::class);

// We expect it to throw an exception when constructed with an invalid dependency
$generator = new RequestGenerator("demo.cashid.info", "/api/parse.php", $non_dependency);
$generator = new RequestGenerator("demo.cashid.info", "/api/parse.php", $cache, $non_dependency);
}

public function dataProviderForTestCreateRequest()
Expand Down

0 comments on commit ea7f3cb

Please sign in to comment.