WIP: Symfony 6 project remake #2

Draft
skobkin wants to merge 103 commits from symfony6_remake into master
4 changed files with 12 additions and 11 deletions
Showing only changes of commit 6c173b2e5c - Show all commits

View file

@ -2,7 +2,7 @@
namespace Tests\Skobkin\PointToolsBundle\Controller;
use src\PointToolsBundle\DataFixtures\ORM\LoadPostData;
use App\DataFixtures\LoadPostData;
use Symfony\Bundle\FrameworkBundle\{Client, Test\WebTestCase};
use Symfony\Component\DomCrawler\Crawler;

View file

@ -1,8 +1,9 @@
<?php
declare(strict_types=1);
namespace Tests\Skobkin\PointToolsBundle\DTO;
use src\PointToolsBundle\DTO\TopUserDTO;
use App\DTO\TopUserDTO;
class TopUserTest extends \PHPUnit_Framework_TestCase
{
@ -16,8 +17,8 @@ class TopUserTest extends \PHPUnit_Framework_TestCase
*/
public function testGetLogin(TopUserDTO $topUser)
{
$this->assertInternalType('string', $topUser->getLogin());
$this->assertEquals('testuser', $topUser->getLogin());
$this->assertInternalType('string', $topUser->login);
$this->assertEquals('testuser', $topUser->login);
}
/**
@ -25,7 +26,7 @@ class TopUserTest extends \PHPUnit_Framework_TestCase
*/
public function testGetSubscribersCount(TopUserDTO $topUser)
{
$this->assertInternalType('int', $topUser->getSubscribersCount());
$this->assertEquals(3, $topUser->getSubscribersCount());
$this->assertInternalType('int', $topUser->subscribersCount);
$this->assertEquals(3, $topUser->subscribersCount);
}
}

View file

@ -2,8 +2,8 @@
namespace Tests\Skobkin\PointToolsBundle\Repository;
use App\DTO\TopUserDTO;
use Doctrine\ORM\EntityManager;
use src\PointToolsBundle\DTO\TopUserDTO;
use src\PointToolsBundle\Entity\User;
use src\PointToolsBundle\Repository\UserRepository;
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;

View file

@ -2,13 +2,13 @@
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 Psr\Log\LoggerInterface;
use src\PointToolsBundle\DTO\Api\User as UserDTO;
use src\PointToolsBundle\Entity\User;
use src\PointToolsBundle\Exception\Factory\InvalidUserDataException;
use src\PointToolsBundle\Repository\UserRepository;
use src\PointToolsBundle\Service\Factory\UserFactory;
class UserFactoryTest extends TestCase
{