You are here

public function MathTest::testDivision in Tamper 8

Test division.

File

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

Class

MathTest
Tests the math plugin.

Namespace

Drupal\Tests\tamper\Unit\Plugin\Tamper

Code

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