* many things

This commit is contained in:
Danyi Dávid
2020-04-23 18:26:12 +02:00
parent 7283d6eefb
commit 3cafc2996e
47 changed files with 3232 additions and 1362 deletions

View File

@@ -2,7 +2,7 @@
namespace AppTest\Action;
use App\Action\HomePageAction;
use App\Handler\HomePage;
use Interop\Http\ServerMiddleware\DelegateInterface;
use PHPUnit\Framework\TestCase;
use Prophecy\Argument;
@@ -24,7 +24,7 @@ class HomePageActionTest extends TestCase
public function testReturnsJsonResponseWhenNoTemplateRendererProvided()
{
$homePage = new HomePageAction($this->router->reveal(), null);
$homePage = new HomePage($this->router->reveal(), null);
$response = $homePage->process(
$this->prophesize(ServerRequestInterface::class)->reveal(),
$this->prophesize(DelegateInterface::class)->reveal()
@@ -40,7 +40,7 @@ class HomePageActionTest extends TestCase
->render('app::home-page', Argument::type('array'))
->willReturn('');
$homePage = new HomePageAction($this->router->reveal(), $renderer->reveal());
$homePage = new HomePage($this->router->reveal(), $renderer->reveal());
$response = $homePage->process(
$this->prophesize(ServerRequestInterface::class)->reveal(),

View File

@@ -2,8 +2,8 @@
namespace AppTest\Action;
use App\Action\HomePageAction;
use App\Action\HomePageFactory;
use App\Handler\HomePage;
use App\Handler\HomePageFactory;
use Interop\Container\ContainerInterface;
use PHPUnit\Framework\TestCase;
use Zend\Expressive\Router\RouterInterface;
@@ -31,7 +31,7 @@ class HomePageFactoryTest extends TestCase
$homePage = $factory($this->container->reveal());
$this->assertInstanceOf(HomePageAction::class, $homePage);
$this->assertInstanceOf(HomePage::class, $homePage);
}
public function testFactoryWithTemplate()
@@ -46,6 +46,6 @@ class HomePageFactoryTest extends TestCase
$homePage = $factory($this->container->reveal());
$this->assertInstanceOf(HomePageAction::class, $homePage);
$this->assertInstanceOf(HomePage::class, $homePage);
}
}

View File

@@ -2,7 +2,7 @@
namespace AppTest\Action;
use App\Action\PingAction;
use App\Handler\PingAction;
use Interop\Http\ServerMiddleware\DelegateInterface;
use PHPUnit\Framework\TestCase;
use Psr\Http\Message\ServerRequestInterface;