test numeric array override
This commit is contained in:
parent
ed554705e5
commit
29db532049
4 changed files with 54 additions and 3 deletions
|
|
@ -139,6 +139,33 @@ class SettingsTest extends TestCase
|
|||
|
||||
$this->assertEquals('testing', $cfg->testFiles);
|
||||
$this->assertEquals(42, $cfg->answer);
|
||||
|
||||
return $cfg;
|
||||
}
|
||||
|
||||
/**
|
||||
* @depends testTestingOverride
|
||||
*/
|
||||
public function testTestingNumArrayOverride(Settings $cfg)
|
||||
{
|
||||
$data = [
|
||||
0 => 'Index0_test',
|
||||
1 => 'Index1_default',
|
||||
2 => 'Index2_test',
|
||||
3 => 'Index3_local',
|
||||
4 => 'Index4_local',
|
||||
5 => 'Index5_local',
|
||||
6 => 'Index6_default',
|
||||
7 => 'Index7_default',
|
||||
10 => 'Index10_test'
|
||||
];
|
||||
|
||||
$numArray = $cfg->numArray;
|
||||
|
||||
foreach ($numArray as $key => $value)
|
||||
{
|
||||
$this->assertEquals($data[$key], $value);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue