function PhpUnitWarningsTest::testAssertArraySubset

Tests assertArraySubset.

File

core/tests/Drupal/Tests/PhpUnitWarningsTest.php, line 50

Class

PhpUnitWarningsTest
@coversDefaultClass \Drupal\Tests\Traits\PhpUnitWarnings @group legacy

Namespace

Drupal\Tests

Code

public function testAssertArraySubset() {
    if (RunnerVersion::getMajor() > 8) {
        $this->markTestSkipped("In PHPUnit 9+, assertArraySubset() is removed.");
    }
    $this->expectDeprecation('assertArraySubset() is deprecated and will be removed in PHPUnit 9.');
    $this->assertArraySubset([
        'a',
    ], [
        'a',
        'b',
    ]);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.