mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +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,
|
||||
\Rector\Symfony\Set\SymfonyLevelSetList::UP_TO_SYMFONY_44,
|
||||
\Rector\Doctrine\Set\DoctrineSetList::DOCTRINE_CODE_QUALITY,
|
||||
\Rector\PHPUnit\Set\PHPUnitLevelSetList::UP_TO_PHPUNIT_90,
|
||||
]);
|
||||
|
||||
// some routes are added twice if it remains activated
|
||||
|
@ -192,7 +192,7 @@ final class ActivityControllerTest extends WebTestCase
|
||||
|
||||
$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
|
||||
{
|
||||
/**
|
||||
* @doesNotPerformAssertions
|
||||
*/
|
||||
public function testToWrite(): never
|
||||
{
|
||||
$this->markTestSkipped();
|
||||
|
@ -19,6 +19,9 @@ use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
|
||||
*/
|
||||
final class ActivityReasonControllerTest extends WebTestCase
|
||||
{
|
||||
/**
|
||||
* @doesNotPerformAssertions
|
||||
*/
|
||||
public function testToWrite(): never
|
||||
{
|
||||
$this->markTestSkipped();
|
||||
|
@ -19,6 +19,9 @@ use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
|
||||
*/
|
||||
final class ActivityTypeControllerTest extends WebTestCase
|
||||
{
|
||||
/**
|
||||
* @doesNotPerformAssertions
|
||||
*/
|
||||
public function testToWrite(): never
|
||||
{
|
||||
$this->markTestSkipped();
|
||||
|
@ -34,6 +34,9 @@ final class TranslatableActivityReasonTest extends TypeTestCase
|
||||
parent::setUp();
|
||||
}
|
||||
|
||||
/**
|
||||
* @doesNotPerformAssertions
|
||||
*/
|
||||
public function testSimple(): never
|
||||
{
|
||||
$translatableActivityReasonType = new PickActivityReasonType(
|
||||
|
@ -19,6 +19,9 @@ use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
|
||||
*/
|
||||
final class TimelineProviderTest extends WebTestCase
|
||||
{
|
||||
/**
|
||||
* @doesNotPerformAssertions
|
||||
*/
|
||||
public function testAnActivityIsShownOnTimeline(): never
|
||||
{
|
||||
$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
|
||||
{
|
||||
/**
|
||||
* @doesNotPerformAssertions
|
||||
*/
|
||||
public function testIndex()
|
||||
{
|
||||
$client = self::createClient();
|
||||
@ -26,6 +29,9 @@ final class ElementControllerTest extends WebTestCase
|
||||
$crawler = $client->request('GET', '/index');
|
||||
}
|
||||
|
||||
/**
|
||||
* @doesNotPerformAssertions
|
||||
*/
|
||||
public function testList()
|
||||
{
|
||||
$client = self::createClient();
|
||||
|
@ -169,9 +169,7 @@ final class StoredObjectManagerTest extends TestCase
|
||||
$response = new stdClass();
|
||||
$response->url = $storedObject->getFilename();
|
||||
|
||||
$tempUrlGenerator = $this
|
||||
->getMockBuilder(TempUrlGeneratorInterface::class)
|
||||
->getMock();
|
||||
$tempUrlGenerator = $this->createMock(TempUrlGeneratorInterface::class);
|
||||
|
||||
$tempUrlGenerator
|
||||
->method('generate')
|
||||
|
@ -19,6 +19,9 @@ use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
|
||||
*/
|
||||
final class EventControllerTest extends WebTestCase
|
||||
{
|
||||
/**
|
||||
* @doesNotPerformAssertions
|
||||
*/
|
||||
public function testSkipped(): never
|
||||
{
|
||||
$this->markTestSkipped();
|
||||
|
@ -19,6 +19,9 @@ use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
|
||||
*/
|
||||
final class EventTypeControllerTest extends WebTestCase
|
||||
{
|
||||
/**
|
||||
* @doesNotPerformAssertions
|
||||
*/
|
||||
public function testSkipped(): never
|
||||
{
|
||||
$this->markTestSkipped();
|
||||
|
@ -19,6 +19,9 @@ use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
|
||||
*/
|
||||
final class RoleControllerTest extends WebTestCase
|
||||
{
|
||||
/**
|
||||
* @doesNotPerformAssertions
|
||||
*/
|
||||
public function testSkipped(): never
|
||||
{
|
||||
$this->markTestSkipped();
|
||||
|
@ -19,6 +19,9 @@ use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
|
||||
*/
|
||||
final class StatusControllerTest extends WebTestCase
|
||||
{
|
||||
/**
|
||||
* @doesNotPerformAssertions
|
||||
*/
|
||||
public function testSkipped(): never
|
||||
{
|
||||
$this->markTestSkipped();
|
||||
|
@ -348,7 +348,7 @@ abstract class AbstractExportTest extends WebTestCase
|
||||
$client->getResponse()->isSuccessful(),
|
||||
'test that the response of /fr/exports/ is successful'
|
||||
);
|
||||
$this->assertContains(
|
||||
$this->assertStringContainsString(
|
||||
$title,
|
||||
$crawler->text(),
|
||||
'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
|
||||
{
|
||||
/**
|
||||
* @doesNotPerformAssertions
|
||||
*/
|
||||
public function testEmpty(): never
|
||||
{
|
||||
$this->markTestSkipped();
|
||||
|
@ -38,6 +38,9 @@ final class AbstractSearchTest extends \PHPUnit\Framework\TestCase
|
||||
$this->assertEquals('01', $date->format('d'));
|
||||
}
|
||||
|
||||
/**
|
||||
* @doesNotPerformAssertions
|
||||
*/
|
||||
public function testRecompose(): never
|
||||
{
|
||||
$this->markTestSkipped();
|
||||
|
@ -40,6 +40,9 @@ final class AccompanyingPeriodConfidentialTest extends WebTestCase
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @doesNotPerformAssertions
|
||||
*/
|
||||
public function testConfidentialInvalid()
|
||||
{
|
||||
$this->markTestSkipped("test not written fully");
|
||||
|
@ -250,7 +250,7 @@ final class ReportControllerTest extends WebTestCase
|
||||
$link,
|
||||
'There is a "add a report" link in menu'
|
||||
);
|
||||
$this->assertContains(
|
||||
$this->assertStringContainsString(
|
||||
sprintf(
|
||||
'/fr/person/%d/report/select/type/for/creation',
|
||||
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
|
||||
*/
|
||||
/**
|
||||
* @doesNotPerformAssertions
|
||||
*/
|
||||
public function testDeclareReportAsCustomizable()
|
||||
{
|
||||
self::bootKernel(['environment' => 'test']);
|
||||
|
@ -96,9 +96,9 @@ final class ReportSearchTest extends WebTestCase
|
||||
$crawlerSocial = $clientSocial->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());
|
||||
$this->assertNotContains('administrative', $crawlerAdministrative->filter('.content')
|
||||
$this->assertStringNotContainsString('administrative', $crawlerAdministrative->filter('.content')
|
||||
->text());
|
||||
}
|
||||
|
||||
|
@ -123,7 +123,7 @@ final class TimelineProviderTest extends WebTestCase
|
||||
$client->getResponse()->isSuccessful(),
|
||||
'The page timeline is loaded successfully'
|
||||
);
|
||||
$this->assertContains(
|
||||
$this->assertStringContainsString(
|
||||
'a ajouté un rapport',
|
||||
$crawler->text(),
|
||||
'the page contains the text "a publié un rapport"'
|
||||
|
@ -19,6 +19,9 @@ use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
|
||||
*/
|
||||
final class ThirdPartyControllerTest extends WebTestCase
|
||||
{
|
||||
/**
|
||||
* @doesNotPerformAssertions
|
||||
*/
|
||||
public function testIndex()
|
||||
{
|
||||
$client = self::createClient();
|
||||
@ -26,6 +29,9 @@ final class ThirdPartyControllerTest extends WebTestCase
|
||||
$crawler = $client->request('GET', '/index');
|
||||
}
|
||||
|
||||
/**
|
||||
* @doesNotPerformAssertions
|
||||
*/
|
||||
public function testNew()
|
||||
{
|
||||
$client = self::createClient();
|
||||
@ -33,6 +39,9 @@ final class ThirdPartyControllerTest extends WebTestCase
|
||||
$crawler = $client->request('GET', '/new');
|
||||
}
|
||||
|
||||
/**
|
||||
* @doesNotPerformAssertions
|
||||
*/
|
||||
public function testUpdate()
|
||||
{
|
||||
$client = self::createClient();
|
||||
|
Loading…
x
Reference in New Issue
Block a user