* refactored with entity service, so the code can be tested

This commit is contained in:
Danyi Dávid
2016-08-01 17:30:43 +02:00
parent f3939bbd13
commit 2de0bf8add
35 changed files with 359 additions and 215 deletions

View File

@@ -5,22 +5,21 @@ namespace AppTest\Action;
use App\Action\HomePageAction;
use Zend\Diactoros\Response;
use Zend\Diactoros\ServerRequest;
use Zend\Expressive\Router\RouterInterface;
use Doctrine\ORM\EntityManager;
class HomePageActionTest extends \PHPUnit_Framework_TestCase
{
/** @var RouterInterface */
protected $router;
protected function setUp()
{
$this->router = $this->prophesize(RouterInterface::class);
}
public function testResponse()
{
$homePage = new HomePageAction($this->router->reveal(), null);
$homePage = new HomePageAction();
$response = $homePage(new ServerRequest(['/']), new Response(), function () {
});
$this->assertTrue($response instanceof Response);