public function ConvertBooleanTest::testConvertBooleanOtherText in Tamper 8
Test convert to boolean other text case.
File
- tests/
src/ Unit/ Plugin/ Tamper/ ConvertBooleanTest.php, line 102
Class
- ConvertBooleanTest
- Tests the convert boolean plugin.
Namespace
Drupal\Tests\tamper\Unit\Plugin\TamperCode
public function testConvertBooleanOtherText() {
$config = [
ConvertBoolean::SETTING_TRUTH_VALUE => 'A',
ConvertBoolean::SETTING_FALSE_VALUE => 'B',
ConvertBoolean::SETTING_MATCH_CASE => TRUE,
ConvertBoolean::SETTING_NO_MATCH => 'other text',
ConvertBoolean::SETTING_OTHER_TEXT => 'other text',
];
$plugin = new ConvertBoolean($config, 'convert_boolean', [], $this
->getMockSourceDefinition());
$this
->assertEquals('other text', $plugin
->tamper('a'));
}