You are here

public function MathTest::testFlipSubtraction in Tamper 8

Test flip out with subtraction.

File

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

Class

MathTest
Tests the math plugin.

Namespace

Drupal\Tests\tamper\Unit\Plugin\Tamper

Code

public function testFlipSubtraction() {
  $config = [
    Math::SETTING_OPERATION => 'subtraction',
    Math::SETTING_FLIP => TRUE,
    Math::SETTING_VALUE => 3,
  ];
  $plugin = new Math($config, 'math', [], $this
    ->getMockSourceDefinition());
  $this
    ->assertEquals(1, $plugin
    ->tamper(2));
}