Dieser Commit ist enthalten in:
Ursprung
2b21070b1a
Commit
f7a7c71f86
1583 geänderte Dateien mit 454759 neuen und 0 gelöschten Zeilen
32
tests/unit/library/Msd/FileTest.php
Normale Datei
32
tests/unit/library/Msd/FileTest.php
Normale Datei
|
|
@ -0,0 +1,32 @@
|
|||
<?php
|
||||
/**
|
||||
* @group Files
|
||||
*/
|
||||
class Msd_FileTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
public function testCanGetChmodValueOfFile()
|
||||
{
|
||||
$valid = array('0644', '664', '666', '0755', '0777');
|
||||
$res = Msd_File::getChmod(CONFIG_PATH . '/mysqldumper.ini');
|
||||
$this->assertTrue(in_array($res, $valid));
|
||||
}
|
||||
|
||||
public function testCanGetConfigurationNames()
|
||||
{
|
||||
$configNames = Msd_File::getConfigNames();
|
||||
$this->assertNotEmpty($configNames);
|
||||
$this->assertTrue(in_array('mysqldumper', $configNames));
|
||||
}
|
||||
|
||||
public function testRetrunsEmptyArrayIfPathIsNotReadable()
|
||||
{
|
||||
$config = Msd_Configuration::getInstance();
|
||||
$oldPath = $config->get('paths.config');
|
||||
$config->set('paths.config', '/I/Dont/Exist');
|
||||
$configNames = Msd_File::getConfigNames();
|
||||
$config->set('paths.config', $oldPath);
|
||||
$this->assertTrue(is_array($configNames));
|
||||
$this->assertEmpty($configNames);
|
||||
}
|
||||
|
||||
}
|
||||
Laden …
Tabelle hinzufügen
Einen Link hinzufügen
In neuem Issue referenzieren