protected function XAutoloadWebTestCase::assertAutoloadStackOrder in X Autoload 7.3
1 call to XAutoloadWebTestCase::assertAutoloadStackOrder()
- XAutoloadWebTestCase::xautoloadCheckTestEnvironment in lib/
Drupal/ xautoload/ Tests/ XAutoloadWebTestCase.php
File
- lib/
Drupal/ xautoload/ Tests/ XAutoloadWebTestCase.php, line 144
Class
Namespace
Drupal\xautoload\TestsCode
protected function assertAutoloadStackOrder($autoload_stack, $mode) {
$expected = $this
->expectedAutoloadStackOrder($mode);
foreach ($autoload_stack as $index => $str) {
if (!isset($expected[$index])) {
break;
}
$expected_str = $expected[$index];
if ($expected_str === $str) {
$this
->pass("Autoload callback at index {$index} must be {$expected_str}.");
}
else {
$this
->fail("Autoload callback at index {$index} must be {$expected_str} instead of {$str}.");
}
}
if (!isset($index)) {
return;
}
for (++$index; isset($autoload_stack[$index]); ++$index) {
$str = $autoload_stack[$index];
$this
->fail("Autoload callback at index {$index} must be empty instead of {$str}.");
}
for (++$index; isset($expected[$index]); ++$index) {
$expected_str = $expected[$index];
$this
->fail("Autoload callback at index {$index} must be {$expected_str} instead being empty.");
}
}