mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-08 08:49:52 +00:00
DX: apply rector rules for phpunit up to 90
This commit is contained in:
parent
e4e52234ad
commit
b85cd1b994
@ -27,6 +27,7 @@ return static function (RectorConfig $rectorConfig): void {
|
|||||||
LevelSetList::UP_TO_PHP_82,
|
LevelSetList::UP_TO_PHP_82,
|
||||||
\Rector\Symfony\Set\SymfonyLevelSetList::UP_TO_SYMFONY_44,
|
\Rector\Symfony\Set\SymfonyLevelSetList::UP_TO_SYMFONY_44,
|
||||||
\Rector\Doctrine\Set\DoctrineSetList::DOCTRINE_CODE_QUALITY,
|
\Rector\Doctrine\Set\DoctrineSetList::DOCTRINE_CODE_QUALITY,
|
||||||
|
\Rector\PHPUnit\Set\PHPUnitLevelSetList::UP_TO_PHPUNIT_90,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
// some routes are added twice if it remains activated
|
// some routes are added twice if it remains activated
|
||||||
|
@ -192,7 +192,7 @@ final class ActivityControllerTest extends WebTestCase
|
|||||||
|
|
||||||
$crawler = $client->followRedirect();
|
$crawler = $client->followRedirect();
|
||||||
|
|
||||||
$this->assertNotContains('January 25, 2015', $crawler->text());
|
$this->assertStringNotContainsString('January 25, 2015', $crawler->text());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -19,6 +19,9 @@ use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
|
|||||||
*/
|
*/
|
||||||
final class ActivityReasonCategoryControllerTest extends WebTestCase
|
final class ActivityReasonCategoryControllerTest extends WebTestCase
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* @doesNotPerformAssertions
|
||||||
|
*/
|
||||||
public function testToWrite(): never
|
public function testToWrite(): never
|
||||||
{
|
{
|
||||||
$this->markTestSkipped();
|
$this->markTestSkipped();
|
||||||
|
@ -19,6 +19,9 @@ use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
|
|||||||
*/
|
*/
|
||||||
final class ActivityReasonControllerTest extends WebTestCase
|
final class ActivityReasonControllerTest extends WebTestCase
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* @doesNotPerformAssertions
|
||||||
|
*/
|
||||||
public function testToWrite(): never
|
public function testToWrite(): never
|
||||||
{
|
{
|
||||||
$this->markTestSkipped();
|
$this->markTestSkipped();
|
||||||
|
@ -19,6 +19,9 @@ use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
|
|||||||
*/
|
*/
|
||||||
final class ActivityTypeControllerTest extends WebTestCase
|
final class ActivityTypeControllerTest extends WebTestCase
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* @doesNotPerformAssertions
|
||||||
|
*/
|
||||||
public function testToWrite(): never
|
public function testToWrite(): never
|
||||||
{
|
{
|
||||||
$this->markTestSkipped();
|
$this->markTestSkipped();
|
||||||
|
@ -34,6 +34,9 @@ final class TranslatableActivityReasonTest extends TypeTestCase
|
|||||||
parent::setUp();
|
parent::setUp();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @doesNotPerformAssertions
|
||||||
|
*/
|
||||||
public function testSimple(): never
|
public function testSimple(): never
|
||||||
{
|
{
|
||||||
$translatableActivityReasonType = new PickActivityReasonType(
|
$translatableActivityReasonType = new PickActivityReasonType(
|
||||||
|
@ -19,6 +19,9 @@ use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
|
|||||||
*/
|
*/
|
||||||
final class TimelineProviderTest extends WebTestCase
|
final class TimelineProviderTest extends WebTestCase
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* @doesNotPerformAssertions
|
||||||
|
*/
|
||||||
public function testAnActivityIsShownOnTimeline(): never
|
public function testAnActivityIsShownOnTimeline(): never
|
||||||
{
|
{
|
||||||
$this->markTestSkipped('we have to write fixtures before writing this tests');
|
$this->markTestSkipped('we have to write fixtures before writing this tests');
|
||||||
|
@ -19,6 +19,9 @@ use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
|
|||||||
*/
|
*/
|
||||||
final class ElementControllerTest extends WebTestCase
|
final class ElementControllerTest extends WebTestCase
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* @doesNotPerformAssertions
|
||||||
|
*/
|
||||||
public function testIndex()
|
public function testIndex()
|
||||||
{
|
{
|
||||||
$client = self::createClient();
|
$client = self::createClient();
|
||||||
@ -26,6 +29,9 @@ final class ElementControllerTest extends WebTestCase
|
|||||||
$crawler = $client->request('GET', '/index');
|
$crawler = $client->request('GET', '/index');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @doesNotPerformAssertions
|
||||||
|
*/
|
||||||
public function testList()
|
public function testList()
|
||||||
{
|
{
|
||||||
$client = self::createClient();
|
$client = self::createClient();
|
||||||
|
@ -169,9 +169,7 @@ final class StoredObjectManagerTest extends TestCase
|
|||||||
$response = new stdClass();
|
$response = new stdClass();
|
||||||
$response->url = $storedObject->getFilename();
|
$response->url = $storedObject->getFilename();
|
||||||
|
|
||||||
$tempUrlGenerator = $this
|
$tempUrlGenerator = $this->createMock(TempUrlGeneratorInterface::class);
|
||||||
->getMockBuilder(TempUrlGeneratorInterface::class)
|
|
||||||
->getMock();
|
|
||||||
|
|
||||||
$tempUrlGenerator
|
$tempUrlGenerator
|
||||||
->method('generate')
|
->method('generate')
|
||||||
|
@ -19,6 +19,9 @@ use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
|
|||||||
*/
|
*/
|
||||||
final class EventControllerTest extends WebTestCase
|
final class EventControllerTest extends WebTestCase
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* @doesNotPerformAssertions
|
||||||
|
*/
|
||||||
public function testSkipped(): never
|
public function testSkipped(): never
|
||||||
{
|
{
|
||||||
$this->markTestSkipped();
|
$this->markTestSkipped();
|
||||||
|
@ -19,6 +19,9 @@ use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
|
|||||||
*/
|
*/
|
||||||
final class EventTypeControllerTest extends WebTestCase
|
final class EventTypeControllerTest extends WebTestCase
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* @doesNotPerformAssertions
|
||||||
|
*/
|
||||||
public function testSkipped(): never
|
public function testSkipped(): never
|
||||||
{
|
{
|
||||||
$this->markTestSkipped();
|
$this->markTestSkipped();
|
||||||
|
@ -19,6 +19,9 @@ use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
|
|||||||
*/
|
*/
|
||||||
final class RoleControllerTest extends WebTestCase
|
final class RoleControllerTest extends WebTestCase
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* @doesNotPerformAssertions
|
||||||
|
*/
|
||||||
public function testSkipped(): never
|
public function testSkipped(): never
|
||||||
{
|
{
|
||||||
$this->markTestSkipped();
|
$this->markTestSkipped();
|
||||||
|
@ -19,6 +19,9 @@ use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
|
|||||||
*/
|
*/
|
||||||
final class StatusControllerTest extends WebTestCase
|
final class StatusControllerTest extends WebTestCase
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* @doesNotPerformAssertions
|
||||||
|
*/
|
||||||
public function testSkipped(): never
|
public function testSkipped(): never
|
||||||
{
|
{
|
||||||
$this->markTestSkipped();
|
$this->markTestSkipped();
|
||||||
|
@ -348,7 +348,7 @@ abstract class AbstractExportTest extends WebTestCase
|
|||||||
$client->getResponse()->isSuccessful(),
|
$client->getResponse()->isSuccessful(),
|
||||||
'test that the response of /fr/exports/ is successful'
|
'test that the response of /fr/exports/ is successful'
|
||||||
);
|
);
|
||||||
$this->assertContains(
|
$this->assertStringContainsString(
|
||||||
$title,
|
$title,
|
||||||
$crawler->text(),
|
$crawler->text(),
|
||||||
'test that the page /fr/exports/ contains the title of the '
|
'test that the page /fr/exports/ contains the title of the '
|
||||||
|
@ -19,6 +19,9 @@ use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
|
|||||||
*/
|
*/
|
||||||
final class PermissionsGroupControllerTest extends WebTestCase
|
final class PermissionsGroupControllerTest extends WebTestCase
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* @doesNotPerformAssertions
|
||||||
|
*/
|
||||||
public function testEmpty(): never
|
public function testEmpty(): never
|
||||||
{
|
{
|
||||||
$this->markTestSkipped();
|
$this->markTestSkipped();
|
||||||
|
@ -38,6 +38,9 @@ final class AbstractSearchTest extends \PHPUnit\Framework\TestCase
|
|||||||
$this->assertEquals('01', $date->format('d'));
|
$this->assertEquals('01', $date->format('d'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @doesNotPerformAssertions
|
||||||
|
*/
|
||||||
public function testRecompose(): never
|
public function testRecompose(): never
|
||||||
{
|
{
|
||||||
$this->markTestSkipped();
|
$this->markTestSkipped();
|
||||||
|
@ -40,6 +40,9 @@ final class AccompanyingPeriodConfidentialTest extends WebTestCase
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @doesNotPerformAssertions
|
||||||
|
*/
|
||||||
public function testConfidentialInvalid()
|
public function testConfidentialInvalid()
|
||||||
{
|
{
|
||||||
$this->markTestSkipped("test not written fully");
|
$this->markTestSkipped("test not written fully");
|
||||||
|
@ -250,7 +250,7 @@ final class ReportControllerTest extends WebTestCase
|
|||||||
$link,
|
$link,
|
||||||
'There is a "add a report" link in menu'
|
'There is a "add a report" link in menu'
|
||||||
);
|
);
|
||||||
$this->assertContains(
|
$this->assertStringContainsString(
|
||||||
sprintf(
|
sprintf(
|
||||||
'/fr/person/%d/report/select/type/for/creation',
|
'/fr/person/%d/report/select/type/for/creation',
|
||||||
self::$person->getId()
|
self::$person->getId()
|
||||||
|
@ -23,6 +23,9 @@ final class ChillReportExtensionTest extends KernelTestCase
|
|||||||
/*
|
/*
|
||||||
* Check if class Chill\ReportBundle\Entity\Report is in chill_custom_fields.customizables_entities
|
* Check if class Chill\ReportBundle\Entity\Report is in chill_custom_fields.customizables_entities
|
||||||
*/
|
*/
|
||||||
|
/**
|
||||||
|
* @doesNotPerformAssertions
|
||||||
|
*/
|
||||||
public function testDeclareReportAsCustomizable()
|
public function testDeclareReportAsCustomizable()
|
||||||
{
|
{
|
||||||
self::bootKernel(['environment' => 'test']);
|
self::bootKernel(['environment' => 'test']);
|
||||||
|
@ -96,9 +96,9 @@ final class ReportSearchTest extends WebTestCase
|
|||||||
$crawlerSocial = $clientSocial->request('GET', '/fr/search', $params);
|
$crawlerSocial = $clientSocial->request('GET', '/fr/search', $params);
|
||||||
$crawlerAdministrative = $clientAdministrative->request('GET', '/fr/search', $params);
|
$crawlerAdministrative = $clientAdministrative->request('GET', '/fr/search', $params);
|
||||||
|
|
||||||
$this->assertNotContains('social', $crawlerAdministrative->filter('.content')
|
$this->assertStringNotContainsString('social', $crawlerAdministrative->filter('.content')
|
||||||
->text());
|
->text());
|
||||||
$this->assertNotContains('administrative', $crawlerAdministrative->filter('.content')
|
$this->assertStringNotContainsString('administrative', $crawlerAdministrative->filter('.content')
|
||||||
->text());
|
->text());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -123,7 +123,7 @@ final class TimelineProviderTest extends WebTestCase
|
|||||||
$client->getResponse()->isSuccessful(),
|
$client->getResponse()->isSuccessful(),
|
||||||
'The page timeline is loaded successfully'
|
'The page timeline is loaded successfully'
|
||||||
);
|
);
|
||||||
$this->assertContains(
|
$this->assertStringContainsString(
|
||||||
'a ajouté un rapport',
|
'a ajouté un rapport',
|
||||||
$crawler->text(),
|
$crawler->text(),
|
||||||
'the page contains the text "a publié un rapport"'
|
'the page contains the text "a publié un rapport"'
|
||||||
|
@ -19,6 +19,9 @@ use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
|
|||||||
*/
|
*/
|
||||||
final class ThirdPartyControllerTest extends WebTestCase
|
final class ThirdPartyControllerTest extends WebTestCase
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* @doesNotPerformAssertions
|
||||||
|
*/
|
||||||
public function testIndex()
|
public function testIndex()
|
||||||
{
|
{
|
||||||
$client = self::createClient();
|
$client = self::createClient();
|
||||||
@ -26,6 +29,9 @@ final class ThirdPartyControllerTest extends WebTestCase
|
|||||||
$crawler = $client->request('GET', '/index');
|
$crawler = $client->request('GET', '/index');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @doesNotPerformAssertions
|
||||||
|
*/
|
||||||
public function testNew()
|
public function testNew()
|
||||||
{
|
{
|
||||||
$client = self::createClient();
|
$client = self::createClient();
|
||||||
@ -33,6 +39,9 @@ final class ThirdPartyControllerTest extends WebTestCase
|
|||||||
$crawler = $client->request('GET', '/new');
|
$crawler = $client->request('GET', '/new');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @doesNotPerformAssertions
|
||||||
|
*/
|
||||||
public function testUpdate()
|
public function testUpdate()
|
||||||
{
|
{
|
||||||
$client = self::createClient();
|
$client = self::createClient();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user