public function testSystemConfigFile()
{
$xml = '<config>
<file groupPermission="r" everyonePermission="">
<groupOwner>ftp</groupOwner>
</file>
</config>';
$config3 = new SystemConfig();
$filePermission = new FilePermission();
$filePermission->setGroupPermission('r');
$filePermission->setEveryonePermission('');
$filePermission->setGroupOwner('ftp');
$config3->setFile($filePermission);
$this->assertEquals($xml, $config3->toXml());
$reverse = new SystemConfig($xml);
$this->assertFalse($reverse->getFile()->getDisableModeChange());
$this->assertEquals('r', $reverse->getFile()->getGroupPermission());
$this->assertEquals('', $reverse->getFile()->getEveryonePermission());
$this->assertEquals('ftp', $reverse->getFile()->getGroupOwner());
$this->assertEquals($xml, $reverse->toXml());
$xml = '<config>
<file disableModeChange="true"/>
</config>';
$config4 = new SystemConfig();
$filePermission = new FilePermission();
$filePermission->setDisableModeChange(true);
$config4->setFile($filePermission);
$this->assertEquals($xml, $config4->toXml());
$reverse = new SystemConfig($xml);
$this->assertTrue($reverse->getFile()->getDisableModeChange());
$this->assertEquals($xml, $reverse->toXml());
}