예제 #1
0
 public function testSuccess()
 {
     $config = Yii::getAlias('@app/config/local/test.php');
     $command = new CreateLocalConfigController('test', 'test');
     $command->path = $config;
     $command->beforeAction('test');
     $command->actionIndex();
     expect_file($config)->exists();
     unlink($config);
     expect_file($config)->notExists();
 }
예제 #2
0
 public function testEqualsXmlFile()
 {
     expect_file(__DIR__ . DIRECTORY_SEPARATOR . 'assets' . DIRECTORY_SEPARATOR . 'xml-test-file.xml')->equalsXmlFile(__DIR__ . DIRECTORY_SEPARATOR . 'assets' . DIRECTORY_SEPARATOR . 'xml-test-file.xml');
     expect('<foo><bar>Baz</bar><bar>Baz</bar></foo>')->equalsXmlFile(__DIR__ . DIRECTORY_SEPARATOR . 'assets' . DIRECTORY_SEPARATOR . 'xml-test-file.xml');
 }