You are here

public function PhpUnitWarningsTest::testAssertArraySubset in Drupal 9

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',
  ]);
}