[automated] Re-Generate Nodes/Rectors Documentation (#4618)

Co-authored-by: kodiakhq <kodiakhq@users.noreply.github.com>
This commit is contained in:
github-actions[bot] 2020-11-16 01:40:38 +01:00 committed by GitHub
parent 7fcbac3230
commit e704af3dd7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -10102,6 +10102,29 @@ Turns same bool and null comparisons to their method name alternatives in PHPUni
<br><br>
### `AssertSameTrueFalseToAssertTrueFalseRector`
- class: [`Rector\PHPUnit\Rector\MethodCall\AssertSameTrueFalseToAssertTrueFalseRector`](/rules/phpunit/src/Rector/MethodCall/AssertSameTrueFalseToAssertTrueFalseRector.php)
- [test fixtures](/rules/phpunit/tests/Rector/MethodCall/AssertSameTrueFalseToAssertTrueFalseRector/Fixture)
Change `$this->assertSame(true,` ...) to `assertTrue()`
```diff
use PHPUnit\Framework\TestCase;
final class SomeTest extends TestCase
{
public function test()
{
$value = (bool) mt_rand(0, 1);
- $this->assertSame(true, $value);
+ $this->assertTrue($value);
}
}
```
<br><br>
### `AssertTrueFalseInternalTypeToSpecificMethodRector`
- class: [`Rector\PHPUnit\Rector\MethodCall\AssertTrueFalseInternalTypeToSpecificMethodRector`](/rules/phpunit/src/Rector/MethodCall/AssertTrueFalseInternalTypeToSpecificMethodRector.php)
@ -10374,33 +10397,6 @@ Remove `expect($this->any())` from mocks as it has no added value
<br><br>
### `ReplaceAssertArraySubsetRector`
- class: [`Rector\PHPUnit\Rector\MethodCall\ReplaceAssertArraySubsetRector`](/rules/phpunit/src/Rector/MethodCall/ReplaceAssertArraySubsetRector.php)
- [test fixtures](/rules/phpunit/tests/Rector/MethodCall/ReplaceAssertArraySubsetRector/Fixture)
Replace deprecated "assertArraySubset()" method with alternative methods
```diff
use PHPUnit\Framework\TestCase;
final class SomeTest extends TestCase
{
public function test()
{
$checkedArray = [];
- $this->assertArraySubset([
- 'cache_directory' => 'new_value',
- ], $checkedArray, true);
+ $this->assertArrayHasKey('cache_directory', $checkedArray);
+ $this->assertSame('new_value', $checkedArray['cache_directory']);
}
}
```
<br><br>
### `ReplaceAssertArraySubsetWithDmsPolyfillRector`
- class: [`Rector\PHPUnit\Rector\MethodCall\ReplaceAssertArraySubsetWithDmsPolyfillRector`](/rules/phpunit/src/Rector/MethodCall/ReplaceAssertArraySubsetWithDmsPolyfillRector.php)