You are here

protected function UnitsWebTestCase::assertEqualMeasure in Units of Measurement 7.2

Same name and namespace in other branches
  1. 7 units.test \UnitsWebTestCase::assertEqualMeasure()

Compare the provided measure to a standard one.

Parameters

Entity $measure: Measure that should be compared against standard

Entity $standard: Measure that is the standard one in the comparison

string $message: Assert message to display on the UI of the test result

1 call to UnitsWebTestCase::assertEqualMeasure()
UnitsWebTestCase::testCrud in ./units.test
Conduct testing of CRUD operations.

File

./units.test, line 211
Tests for Units module.

Class

UnitsWebTestCase
@file Tests for Units module.

Code

protected function assertEqualMeasure($measure, $standard, $message) {
  $success = $standard->mid == $measure->mid && $standard->measure == $measure->measure && $standard->converter == $measure->converter;
  $this
    ->assertTrue($success, $message, 'Units');
}