You are here

public function MathTest::testAddition in Tamper 8

Test addition.

File

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

Class

MathTest
Tests the math plugin.

Namespace

Drupal\Tests\tamper\Unit\Plugin\Tamper

Code

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