Applied rector to test files

This commit is contained in:
Jan Böhmer 2023-06-11 14:18:53 +02:00
parent 7ee01d9a05
commit 98dc553938
46 changed files with 42 additions and 102 deletions

View file

@ -30,6 +30,6 @@ use App\Entity\Attachments\AttachmentType;
*/
class AttachmentTypeControllerTest extends AbstractAdminControllerTest
{
protected static string $base_path = '/en'.'/attachment_type';
protected static string $base_path = '/en/attachment_type';
protected static string $entity_class = AttachmentType::class;
}

View file

@ -30,6 +30,6 @@ use App\Entity\Parts\Category;
*/
class CategoryControllerTest extends AbstractAdminControllerTest
{
protected static string $base_path = '/en'.'/category';
protected static string $base_path = '/en/category';
protected static string $entity_class = Category::class;
}

View file

@ -30,6 +30,6 @@ use App\Entity\Parts\Footprint;
*/
class FootprintControllerTest extends AbstractAdminControllerTest
{
protected static string $base_path = '/en'.'/footprint';
protected static string $base_path = '/en/footprint';
protected static string $entity_class = Footprint::class;
}

View file

@ -46,7 +46,7 @@ use Symfony\Component\Security\Core\Exception\AccessDeniedException;
class LabelProfileControllerTest extends AbstractAdminControllerTest
{
protected static string $base_path = '/en'.'/label_profile';
protected static string $base_path = '/en/label_profile';
protected static string $entity_class = LabelProfile::class;
/**

View file

@ -30,6 +30,6 @@ use App\Entity\Parts\Manufacturer;
*/
class ManufacturerControllerTest extends AbstractAdminControllerTest
{
protected static string $base_path = '/en'.'/manufacturer';
protected static string $base_path = '/en/manufacturer';
protected static string $entity_class = Manufacturer::class;
}

View file

@ -30,6 +30,6 @@ use App\Entity\Parts\MeasurementUnit;
*/
class MeasurementUnitControllerTest extends AbstractAdminControllerTest
{
protected static string $base_path = '/en'.'/measurement_unit';
protected static string $base_path = '/en/measurement_unit';
protected static string $entity_class = MeasurementUnit::class;
}

View file

@ -31,6 +31,6 @@ use App\Entity\ProjectSystem\Project;
*/
class ProjectControllerTest extends AbstractAdminControllerTest
{
protected static string $base_path = '/en'.'/project';
protected static string $base_path = '/en/project';
protected static string $entity_class = Project::class;
}

View file

@ -30,6 +30,6 @@ use App\Entity\Parts\Storelocation;
*/
class StorelocationControllerTest extends AbstractAdminControllerTest
{
protected static string $base_path = '/en'.'/store_location';
protected static string $base_path = '/en/store_location';
protected static string $entity_class = Storelocation::class;
}

View file

@ -30,6 +30,6 @@ use App\Entity\Parts\Supplier;
*/
class SupplierControllerTest extends AbstractAdminControllerTest
{
protected static string $base_path = '/en'.'/supplier';
protected static string $base_path = '/en/supplier';
protected static string $entity_class = Supplier::class;
}

View file

@ -75,7 +75,7 @@ class RedirectControllerTest extends WebTestCase
$this->client->request('GET', $url);
$response = $this->client->getResponse();
if ($expect_redirect) {
$this->assertSame(302, $response->getStatusCode());
$this->assertResponseStatusCodeSame(302);
}
$this->assertSame($expect_redirect, $response->isRedirect());
}
@ -104,10 +104,6 @@ class RedirectControllerTest extends WebTestCase
* @dataProvider urlAddLocaleDataProvider
* @group slow
* @depends testUrlMatch
*
* @param string|null $user_locale
* @param string $input_path
* @param string $redirect_path
*/
public function testAddLocale(?string $user_locale, string $input_path, string $redirect_path): void
{
@ -122,6 +118,6 @@ class RedirectControllerTest extends WebTestCase
$this->client->followRedirects(false);
$this->client->request('GET', $input_path);
$this->assertSame($redirect_path, $this->client->getResponse()->headers->get('Location'));
$this->assertResponseRedirects($redirect_path);
}
}