public function MathTest::testSequential in Realistic Dummy Content 8.2
Same name and namespace in other branches
- 7.2 api/src/test/includes/MathTest.php \Drupal\realistic_dummy_content_api\Test\MathTest::testSequential()
Tests Math::sequential().
@dataProvider providerTestSequential
Parameters
int $start: Start number passed to realistic_dummy_content_api_sequential().
int $end: End number passed to realistic_dummy_content_api_sequential().
string $hash: Hash passed to realistic_dummy_content_api_sequential().
int $expected: Expected result which realistic_dummy_content_api_sequential() is expected to return.
File
- api/
src/ test/ includes/ MathTest.php, line 31
Class
Namespace
Drupal\realistic_dummy_content_api\TestCode
public function testSequential($start, $end, $hash, $expected) {
$math = new Math();
$result = $math
->sequential($start, $end, $hash);
$this
->assertTrue($result == $expected, 'Sequential number is as expected for ' . $start . ', ' . $end . ' with hash ' . $hash . ': [expected] ' . $expected . ' = [result] ' . $result);
}