summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authormsquare <msquare@notrademark.de>2017-11-19 12:05:31 +0100
committerGitHub <noreply@github.com>2017-11-19 12:05:31 +0100
commit4779771d089b4182252d279f7a8ea5d7ada211ad (patch)
tree9e7a8b68215a04e61382805537faf2c5582d934e /tests
parent4eedad6c897be81ef13a3fce155fc5408ed71ce5 (diff)
parent8cd17419a8fd4a28a93956b2fcd6850cdb89d58f (diff)
Merge pull request #350 from MyIgel/master
Fixes for unittests
Diffstat (limited to 'tests')
-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();
}