public function MathTest::testSequential in Realistic Dummy Content 3.x
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/
tests/ src/ Unit/ includes/ MathTest.php, line 30
Class
Namespace
Drupal\Tests\realistic_dummy_content_api\Unit\includesCode
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);
}