From 7f6fdee2b7a285313b74fa821b714617cb3eada1 Mon Sep 17 00:00:00 2001 From: David Grudl Date: Mon, 12 Jan 2015 19:31:06 +0100 Subject: [PATCH] tests: fixes, removed MockHttpRequest --- tests/Application/Presenter.paramChecking.phpt | 11 ++--------- tests/Application/Presenter.storeRequest().phpt | 9 ++------- 2 files changed, 4 insertions(+), 16 deletions(-) diff --git a/tests/Application/Presenter.paramChecking.phpt b/tests/Application/Presenter.paramChecking.phpt index 2e729ef9b..baed26754 100644 --- a/tests/Application/Presenter.paramChecking.phpt +++ b/tests/Application/Presenter.paramChecking.phpt @@ -23,19 +23,12 @@ class TestPresenter extends Application\UI\Presenter } -class MockHttpRequest extends Nette\Http\Request -{ - public function __construct() - {} -} - - $presenter = new TestPresenter; $presenter->injectPrimary( NULL, NULL, - NULL, - new MockHttpRequest, + new Application\Routers\SimpleRouter, + new Http\Request(new Http\UrlScript), new Http\Response ); diff --git a/tests/Application/Presenter.storeRequest().phpt b/tests/Application/Presenter.storeRequest().phpt index ae1b98a81..11a6172fa 100644 --- a/tests/Application/Presenter.storeRequest().phpt +++ b/tests/Application/Presenter.storeRequest().phpt @@ -81,18 +81,13 @@ class MockUser extends Security\User } } -class MockHttpRequest extends Http\Request -{ - public function __construct() {} -} - $presenter = new TestPresenter(); $presenter->injectPrimary( NULL, NULL, - NULL, - new MockHttpRequest, + new Application\Routers\SimpleRouter, + new Http\Request(new Http\UrlScript), new Http\Response, $session = new MockSession, $user = new MockUser