public function ChainedPlaceholderStrategyTest::testProcessPlaceholders in Drupal 8
Same name and namespace in other branches
- 9 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\PlaceholderCode
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));
}