function OptimizedPhpArrayDumperTest::percentsEscapeProvider

Same name and namespace in other branches
  1. 9 core/tests/Drupal/Tests/Component/DependencyInjection/Dumper/OptimizedPhpArrayDumperTest.php \Drupal\Tests\Component\DependencyInjection\Dumper\OptimizedPhpArrayDumperTest::percentsEscapeProvider()
  2. 8.9.x core/tests/Drupal/Tests/Component/DependencyInjection/Dumper/OptimizedPhpArrayDumperTest.php \Drupal\Tests\Component\DependencyInjection\Dumper\OptimizedPhpArrayDumperTest::percentsEscapeProvider()
  3. 11.x core/tests/Drupal/Tests/Component/DependencyInjection/Dumper/OptimizedPhpArrayDumperTest.php \Drupal\Tests\Component\DependencyInjection\Dumper\OptimizedPhpArrayDumperTest::percentsEscapeProvider()

Data provider for testPercentsEscape().

Return value

array[] Returns data-set elements with:

  • expected final value.
  • escaped value in service definition.

File

core/tests/Drupal/Tests/Component/DependencyInjection/Dumper/OptimizedPhpArrayDumperTest.php, line 691

Class

OptimizedPhpArrayDumperTest
@coversDefaultClass \Drupal\Component\DependencyInjection\Dumper\OptimizedPhpArrayDumper[[api-linebreak]] @group DependencyInjection

Namespace

Drupal\Tests\Component\DependencyInjection\Dumper

Code

public static function percentsEscapeProvider() {
  return [
    [
      '%foo%',
      '%%foo%%',
    ],
    [
      'foo%bar%',
      'foo%%bar%%',
    ],
    [
      '%foo%bar',
      '%%foo%%bar',
    ],
    [
      '%',
      '%',
    ],
    [
      '%',
      '%%',
    ],
    [
      '%%',
      '%%%',
    ],
    [
      '%%',
      '%%%%',
    ],
  ];
}

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