mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-08-03 09:44:41 +02:00
Applied rector to test files
This commit is contained in:
parent
7ee01d9a05
commit
98dc553938
46 changed files with 42 additions and 102 deletions
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
||||
/**
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue