You are here

public function SprintfTest::testSprintfChar in Tamper 8

Test using text format %c.

File

tests/src/Unit/Plugin/Tamper/SprintfTest.php, line 44

Class

SprintfTest
Tests the sprintf plugin.

Namespace

Drupal\Tests\tamper\Unit\Plugin\Tamper

Code

public function testSprintfChar() {
  $config = [
    Sprintf::SETTING_TEXT_FORMAT => '%c',
  ];
  $plugin = new Sprintf($config, 'sprintf', [], $this
    ->getMockSourceDefinition());
  $this
    ->assertEquals('A', $plugin
    ->tamper('65'));
}