You are here

public function TamperConvertCaseTest::test in Tamper 7

Basic functionality tests.

File

src/Tests/TamperPlugins.test, line 108
Contains tests for Tamper plugins.

Class

TamperConvertCaseTest
Tests for convert_case.

Code

public function test() {
  $plugin = $this
    ->getPluginInstance();
  $this
    ->assertEqual('TEXT', $plugin
    ->execute('text'));
  $plugin
    ->setConfiguration(array(
    'mode' => 'lower',
  ));
  $this
    ->assertEqual('text', $plugin
    ->execute('TEXT'));
  $plugin
    ->setConfiguration(array(
    'mode' => 'ucfirst',
  ));
  $this
    ->assertEqual('Text', $plugin
    ->execute('text'));
  $plugin
    ->setConfiguration(array(
    'mode' => 'ucwords',
  ));
  $this
    ->assertEqual('This Is The Text', $plugin
    ->execute('this is the text'));
}