Skip to content

Commit

Permalink
Add documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
bbrala committed Nov 25, 2023
1 parent 4e78950 commit e8e4c9a
Showing 1 changed file with 32 additions and 2 deletions.
34 changes: 32 additions & 2 deletions docs/rules_overview.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# 51 Rules Overview
# 52 Rules Overview

<br>

Expand All @@ -10,7 +10,7 @@

- [Drupal9](#drupal9) (26)

- [DrupalRector](#drupalrector) (4)
- [DrupalRector](#drupalrector) (5)

<br>

Expand Down Expand Up @@ -1058,3 +1058,33 @@ Fixes deprecated `MetadataBag::clearCsrfTokenSeed()` calls, used in Drupal 8 and
```

<br>

### ShouldCallParentMethodsRector

PHPUnit based tests should call parent methods (setUp, tearDown)

- class: [`DrupalRector\Rector\PHPUnit\ShouldCallParentMethodsRector`](../src/Rector/PHPUnit/ShouldCallParentMethodsRector.php)

```diff
namespace Drupal\Tests\Rector\Deprecation\PHPUnit\ShouldCallParentMethodsRector\fixture;

use Drupal\KernelTests\KernelTestBase;

final class SetupVoidTest extends KernelTestBase {

protected function setUp(): void
{
+ parent::setUp();
$test = 'doing things';
}

protected function tearDown(): void
{
+ parent::tearDown();
$test = 'doing things';
}

}
```

<br>

0 comments on commit e8e4c9a

Please sign in to comment.