function ChainedPlaceholderStrategyTest::testProcessPlaceholders

Same name in other branches
  1. 9 core/tests/Drupal/Tests/Core/Render/Placeholder/ChainedPlaceholderStrategyTest.php \Drupal\Tests\Core\Render\Placeholder\ChainedPlaceholderStrategyTest::testProcessPlaceholders()
  2. 8.9.x core/tests/Drupal/Tests/Core/Render/Placeholder/ChainedPlaceholderStrategyTest.php \Drupal\Tests\Core\Render\Placeholder\ChainedPlaceholderStrategyTest::testProcessPlaceholders()
  3. 10 core/tests/Drupal/Tests/Core/Render/Placeholder/ChainedPlaceholderStrategyTest.php \Drupal\Tests\Core\Render\Placeholder\ChainedPlaceholderStrategyTest::testProcessPlaceholders()

@covers ::addPlaceholderStrategy @covers ::processPlaceholders

@dataProvider providerProcessPlaceholders

File

core/tests/Drupal/Tests/Core/Render/Placeholder/ChainedPlaceholderStrategyTest.php, line 23

Class

ChainedPlaceholderStrategyTest
@coversDefaultClass \Drupal\Core\Render\Placeholder\ChainedPlaceholderStrategy @group Render

Namespace

Drupal\Tests\Core\Render\Placeholder

Code

public function testProcessPlaceholders($strategies, $placeholders, $result) : void {
    $chained_placeholder_strategy = new ChainedPlaceholderStrategy();
    foreach ($strategies as $strategy) {
        $chained_placeholder_strategy->addPlaceholderStrategy($strategy);
    }
    $this->assertEquals($result, $chained_placeholder_strategy->processPlaceholders($placeholders));
}

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