TestFixes
This commit is contained in:
parent
ad948bdd32
commit
8cd17419a8
|
@ -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);
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue