newVars(); $vars->bla = 'da'; $vars->{'aBc'} = 'normal'; $vars->{'a-0'} = 'special'; $expected = $this->indentVarsList(array( 'vars["a-0"] = "special"', 'vars.aBc = "normal"', 'vars.bla = "da"' )); $this->assertEquals( $vars->toConfigString(), $expected ); } protected function indentVarsList($vars) { return $this->indent . implode( "\n" . $this->indent, $vars ) . "\n"; } protected function newVars() { return new CustomVariables(); } }