Move controller tests to handler tests, update the factory methods to conform to the interface.
This commit is contained in:
parent
7e0285f9b5
commit
ecb7cc395c
@ -36,7 +36,11 @@ class UserFactory implements FactoryInterface
|
|||||||
return $user;
|
return $user;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function toArray(User $user): array
|
/**
|
||||||
|
* @param User $user
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
public static function toArray($user): array
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'name' => $user->getName(),
|
'name' => $user->getName(),
|
||||||
|
@ -7,7 +7,7 @@ use Slovocast\Handler\Handler;
|
|||||||
use Psr\Http\Message\ResponseInterface as Response;
|
use Psr\Http\Message\ResponseInterface as Response;
|
||||||
use Odan\Session\SessionInterface;
|
use Odan\Session\SessionInterface;
|
||||||
|
|
||||||
class ControllerTest extends TestCase
|
class HandlerTest extends TestCase
|
||||||
{
|
{
|
||||||
public function testHtmlInlineResponse(): void
|
public function testHtmlInlineResponse(): void
|
||||||
{
|
{
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Slovocast\Tests\Controller\User;
|
namespace Slovocast\Tests\Handler\User;
|
||||||
|
|
||||||
use Slovocast\Domain\Factory\UserFactory;
|
use Slovocast\Domain\Factory\UserFactory;
|
||||||
use Slovocast\Tests\TestCase;
|
use Slovocast\Tests\TestCase;
|
Loading…
Reference in New Issue
Block a user