WIP: Symfony 6 project remake #2
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
namespace Tests\Skobkin\PointToolsBundle\Controller;
|
namespace Tests\Skobkin\PointToolsBundle\Controller;
|
||||||
|
|
||||||
use src\PointToolsBundle\DataFixtures\ORM\LoadPostData;
|
use App\DataFixtures\LoadPostData;
|
||||||
use Symfony\Bundle\FrameworkBundle\{Client, Test\WebTestCase};
|
use Symfony\Bundle\FrameworkBundle\{Client, Test\WebTestCase};
|
||||||
use Symfony\Component\DomCrawler\Crawler;
|
use Symfony\Component\DomCrawler\Crawler;
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
<?php
|
<?php
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace Tests\Skobkin\PointToolsBundle\DTO;
|
namespace Tests\Skobkin\PointToolsBundle\DTO;
|
||||||
|
|
||||||
use src\PointToolsBundle\DTO\TopUserDTO;
|
use App\DTO\TopUserDTO;
|
||||||
|
|
||||||
class TopUserTest extends \PHPUnit_Framework_TestCase
|
class TopUserTest extends \PHPUnit_Framework_TestCase
|
||||||
{
|
{
|
||||||
|
@ -16,8 +17,8 @@ class TopUserTest extends \PHPUnit_Framework_TestCase
|
||||||
*/
|
*/
|
||||||
public function testGetLogin(TopUserDTO $topUser)
|
public function testGetLogin(TopUserDTO $topUser)
|
||||||
{
|
{
|
||||||
$this->assertInternalType('string', $topUser->getLogin());
|
$this->assertInternalType('string', $topUser->login);
|
||||||
$this->assertEquals('testuser', $topUser->getLogin());
|
$this->assertEquals('testuser', $topUser->login);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -25,7 +26,7 @@ class TopUserTest extends \PHPUnit_Framework_TestCase
|
||||||
*/
|
*/
|
||||||
public function testGetSubscribersCount(TopUserDTO $topUser)
|
public function testGetSubscribersCount(TopUserDTO $topUser)
|
||||||
{
|
{
|
||||||
$this->assertInternalType('int', $topUser->getSubscribersCount());
|
$this->assertInternalType('int', $topUser->subscribersCount);
|
||||||
$this->assertEquals(3, $topUser->getSubscribersCount());
|
$this->assertEquals(3, $topUser->subscribersCount);
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -2,8 +2,8 @@
|
||||||
|
|
||||||
namespace Tests\Skobkin\PointToolsBundle\Repository;
|
namespace Tests\Skobkin\PointToolsBundle\Repository;
|
||||||
|
|
||||||
|
use App\DTO\TopUserDTO;
|
||||||
use Doctrine\ORM\EntityManager;
|
use Doctrine\ORM\EntityManager;
|
||||||
use src\PointToolsBundle\DTO\TopUserDTO;
|
|
||||||
use src\PointToolsBundle\Entity\User;
|
use src\PointToolsBundle\Entity\User;
|
||||||
use src\PointToolsBundle\Repository\UserRepository;
|
use src\PointToolsBundle\Repository\UserRepository;
|
||||||
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
|
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
|
||||||
|
|
|
@ -2,13 +2,13 @@
|
||||||
|
|
||||||
namespace Tests\Skobkin\PointToolsBundle\Service\Factory;
|
namespace Tests\Skobkin\PointToolsBundle\Service\Factory;
|
||||||
|
|
||||||
|
use App\DTO\Api\User as UserDTO;
|
||||||
|
use App\Exception\Factory\InvalidUserDataException;
|
||||||
|
use App\Factory\UserFactory;
|
||||||
use PHPUnit\Framework\TestCase;
|
use PHPUnit\Framework\TestCase;
|
||||||
use Psr\Log\LoggerInterface;
|
use Psr\Log\LoggerInterface;
|
||||||
use src\PointToolsBundle\DTO\Api\User as UserDTO;
|
|
||||||
use src\PointToolsBundle\Entity\User;
|
use src\PointToolsBundle\Entity\User;
|
||||||
use src\PointToolsBundle\Exception\Factory\InvalidUserDataException;
|
|
||||||
use src\PointToolsBundle\Repository\UserRepository;
|
use src\PointToolsBundle\Repository\UserRepository;
|
||||||
use src\PointToolsBundle\Service\Factory\UserFactory;
|
|
||||||
|
|
||||||
class UserFactoryTest extends TestCase
|
class UserFactoryTest extends TestCase
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue