Skip to content

Commit

Permalink
Found a bug while going through the d11 run on project analysis
Browse files Browse the repository at this point in the history
  • Loading branch information
bbrala committed Nov 26, 2023
1 parent 71fd89e commit 8c0fa4e
Show file tree
Hide file tree
Showing 3 changed files with 566 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?php

declare(strict_types=1);

namespace Drupal8\Rector\Deprecation\EntityManagerRector;

use Iterator;
use Rector\Testing\PHPUnit\AbstractRectorTestCase;

class EntityManagerRectorTest extends AbstractRectorTestCase
{
/**
* @covers ::refactor
*
* @dataProvider provideData
*/
public function test(string $filePath): void
{
$this->doTestFile($filePath);
}

/**
* @return Iterator<<string>>
*/
public static function provideData(): \Iterator
{
return self::yieldFilesFromDirectory(__DIR__.'/fixture');
}

public function provideConfigFilePath(): string
{
// must be implemented
return __DIR__.'/config/configured_rule.php';
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

declare(strict_types=1);

use DrupalRector\Drupal8\Rector\Deprecation\EntityManagerRector;
use DrupalRector\Drupal8\Rector\Deprecation\EntityViewRector;
use DrupalRector\Tests\Rector\Deprecation\DeprecationBase;
use Rector\Config\RectorConfig;

return static function (RectorConfig $rectorConfig): void {
// $rectorConfig->rule(EntityViewRector::class);
DeprecationBase::addClass(EntityManagerRector::class, $rectorConfig, false);
};
Loading

0 comments on commit 8c0fa4e

Please sign in to comment.