You are here

public function CalculatorTest::testComparison in Commerce Core 8.2

@covers ::compare

File

modules/price/tests/src/Unit/CalculatorTest.php, line 37

Class

CalculatorTest
Tests the Calculator class.

Namespace

Drupal\Tests\commerce_price\Unit

Code

public function testComparison() {
  $this
    ->assertEquals('0', Calculator::compare('1', '1'));
  $this
    ->assertEquals('1', Calculator::compare('2', '1'));
  $this
    ->assertEquals('-1', Calculator::compare('1', '2'));
}