MDL-76811 mod_data: strpos check should be strict
This commit is contained in:
@@ -124,7 +124,9 @@ class generator_test extends \advanced_testcase {
|
||||
|
||||
for ($i = 1; $i < $count; $i++) {
|
||||
$fieldname = 'field-' . $i;
|
||||
$this->assertTrue(strpos($addtemplate, '[[' . $fieldname . ']]') >= 0);
|
||||
$position = strpos($addtemplate, '[[' . $fieldname . ']]');
|
||||
$this->assertIsNumeric($position);
|
||||
$this->assertGreaterThanOrEqual(0, $position);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user