From 8cd17419a8fd4a28a93956b2fcd6850cdb89d58f Mon Sep 17 00:00:00 2001 From: Igor Scheller Date: Sun, 12 Nov 2017 15:38:12 +0100 Subject: TestFixes --- tests/Unit/HelpersTest.php | 3 +++ tests/Unit/Http/SessionServiceProviderTest.php | 2 ++ 2 files changed, 5 insertions(+) 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(); } -- cgit v1.2.3-70-g09d2