Пример #1
0
 public function testFileSystemRead()
 {
     $config = array('default' => array('adapter' => '\\li3_filesystem\\tests\\mocks\\adapter\\storage\\filesystem\\Mock', 'filters' => array(), 'path' => '/whatever/we/need'));
     FileSystem::config($config);
     $result = FileSystem::config();
     $this->assertEqual($config, $result);
     $filename = 'test_file';
     $data = 'Some Test content';
     $result = FileSystem::write('default', $filename, $data);
     $this->assertTrue($result);
     $result = FileSystem::read('default', $filename);
     $this->assertEqual($data, $result);
 }
Пример #2
0
 public function testFileSystemRead()
 {
     $config = array('default' => array('adapter' => 'File', 'filters' => array(), 'path' => $this->tmpPath));
     FileSystem::config($config);
     $result = FileSystem::config();
     $this->assertEqual($config, $result);
     $filename = 'test_file';
     $data = 'Some Test content';
     $result = FileSystem::write('default', $filename, $data);
     $this->assertTrue($result);
     $result = FileSystem::read('default', $filename);
     $this->assertEqual($data, $result);
 }