summaryrefslogtreecommitdiff
path: root/tests/Unit/Database
diff options
context:
space:
mode:
authorIgor Scheller <igor.scheller@igorshp.de>2018-09-15 17:24:59 +0200
committerIgor Scheller <igor.scheller@igorshp.de>2018-09-16 14:56:07 +0200
commit104e4f4c437376eb739dd3ef2de603855947a557 (patch)
treeb28f33e6d2fbb2aad5af074d2eb1d2e02148c6cd /tests/Unit/Database
parentedeab5e75ffa02b075c151ca03ea1038f61e4396 (diff)
Session: Added Symfony PDO backend
Diffstat (limited to 'tests/Unit/Database')
-rw-r--r--tests/Unit/Database/DatabaseServiceProviderTest.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/Unit/Database/DatabaseServiceProviderTest.php b/tests/Unit/Database/DatabaseServiceProviderTest.php
index 0f259036..7dae065f 100644
--- a/tests/Unit/Database/DatabaseServiceProviderTest.php
+++ b/tests/Unit/Database/DatabaseServiceProviderTest.php
@@ -2,6 +2,7 @@
namespace Engelsystem\Test\Unit\Database;
+use Engelsystem\Application;
use Engelsystem\Config\Config;
use Engelsystem\Database\Database;
use Engelsystem\Database\DatabaseServiceProvider;
@@ -10,6 +11,7 @@ use Engelsystem\Test\Unit\ServiceProviderTest;
use Exception;
use Illuminate\Database\Capsule\Manager as CapsuleManager;
use Illuminate\Database\Connection;
+use PDO;
use PDOException;
use PHPUnit_Framework_MockObject_MockObject as MockObject;
@@ -117,12 +119,12 @@ class DatabaseServiceProviderTest extends ServiceProviderTest
$this->setExpects($connection, 'useDefaultSchemaGrammar');
$connection->expects($this->once())
->method('getPdo')
- ->willReturnCallback(function () use ($getPdoThrowException) {
+ ->willReturnCallback(function () use ($getPdoThrowException, $pdo) {
if ($getPdoThrowException) {
throw new PDOException();
}
- return '';
+ return $pdo;
});
$this->setExpects($dbManager, 'getConnection', [], $connection, $this->atLeastOnce());