function AssertHelperTraitTest::testCastSafeStrings

Same name in other branches
  1. 8.9.x core/tests/Drupal/Tests/AssertHelperTraitTest.php \Drupal\Tests\AssertHelperTraitTest::testCastSafeStrings()

@covers ::castSafeStrings @dataProvider providerCastSafeStrings

File

core/tests/Drupal/Tests/AssertHelperTraitTest.php, line 25

Class

AssertHelperTraitTest
@coversDefaultClass \Drupal\Tests\AssertHelperTrait @group simpletest @group Tests @group legacy

Namespace

Drupal\Tests

Code

public function testCastSafeStrings($expected, $value) {
    $this->expectDeprecation('AssertHelperTrait::castSafeStrings() is deprecated in drupal:9.2.0 and is removed from drupal:10.0.0. There is no replacement; assertEquals() will automatically cast MarkupInterface to strings when needed. See https://www.drupal.org/node/3123638');
    $class = new AssertHelperTestClass();
    $this->assertSame($expected, $class->testMethod($value));
}

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