You are here

public function MathTest::testMultiplication in Tamper 8

Test multiplication.

File

tests/src/Unit/Plugin/Tamper/MathTest.php, line 67

Class

MathTest
Tests the math plugin.

Namespace

Drupal\Tests\tamper\Unit\Plugin\Tamper

Code

public function testMultiplication() {
  $config = [
    Math::SETTING_OPERATION => 'multiplication',
    Math::SETTING_VALUE => 2,
  ];
  $plugin = new Math($config, 'math', [], $this
    ->getMockSourceDefinition());
  $this
    ->assertEquals(4, $plugin
    ->tamper(2));
}