summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Scheller <igor.scheller@igorshp.de>2017-11-12 15:38:12 +0100
committerIgor Scheller <igor.scheller@igorshp.de>2017-11-12 15:38:12 +0100
commit8cd17419a8fd4a28a93956b2fcd6850cdb89d58f (patch)
tree6200c9c60fc40be0be625f28f47188163539a2e8
parentad948bdd3201e922b626a736b0122533bdd37cae (diff)
TestFixes
-rw-r--r--tests/Unit/HelpersTest.php3
-rw-r--r--tests/Unit/Http/SessionServiceProviderTest.php2
2 files changed, 5 insertions, 0 deletions
diff --git a/tests/Unit/HelpersTest.php b/tests/Unit/HelpersTest.php
index 0a8d5d2b..43c29c84 100644
--- a/tests/Unit/HelpersTest.php
+++ b/tests/Unit/HelpersTest.php
@@ -11,6 +11,7 @@ use Engelsystem\Routing\UrlGenerator;
use PHPUnit\Framework\TestCase;
use PHPUnit_Framework_MockObject_MockObject as MockObject;
use Symfony\Component\HttpFoundation\Session\Session;
+use Symfony\Component\HttpFoundation\Session\Storage\SessionStorageInterface as StorageInterface;
class HelpersTest extends TestCase
{
@@ -130,7 +131,9 @@ class HelpersTest extends TestCase
*/
public function testSession()
{
+ $sessionStorage = $this->getMockForAbstractClass(StorageInterface::class);
$sessionMock = $this->getMockBuilder(Session::class)
+ ->setConstructorArgs([$sessionStorage])
->getMock();
$this->getAppMock('session', $sessionMock);
diff --git a/tests/Unit/Http/SessionServiceProviderTest.php b/tests/Unit/Http/SessionServiceProviderTest.php
index 0f17a1af..a78b4f72 100644
--- a/tests/Unit/Http/SessionServiceProviderTest.php
+++ b/tests/Unit/Http/SessionServiceProviderTest.php
@@ -109,7 +109,9 @@ class SessionServiceProviderTest extends ServiceProviderTest
*/
private function getSessionMock()
{
+ $sessionStorage = $this->getMockForAbstractClass(StorageInterface::class);
return $this->getMockBuilder(Session::class)
+ ->setConstructorArgs([$sessionStorage])
->setMethods(['start'])
->getMock();
}