function ChainedPlaceholderStrategyTest::testProcessPlaceholders

Same name in other branches
  1. 8.9.x core/tests/Drupal/Tests/Core/Render/Placeholder/ChainedPlaceholderStrategyTest.php \Drupal\Tests\Core\Render\Placeholder\ChainedPlaceholderStrategyTest::testProcessPlaceholders()
  2. 10 core/tests/Drupal/Tests/Core/Render/Placeholder/ChainedPlaceholderStrategyTest.php \Drupal\Tests\Core\Render\Placeholder\ChainedPlaceholderStrategyTest::testProcessPlaceholders()
  3. 11.x 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 20

Class

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

Namespace

Drupal\Tests\Core\Render\Placeholder

Code

public function testProcessPlaceholders($strategies, $placeholders, $result) {
    $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.