Пример #1
0
 public function testFileSystemComponent()
 {
     $f = new common_configuration_FileSystemComponent(__FILE__, 'r');
     $this->assertEquals($f->getLocation(), __FILE__);
     $this->assertEquals($f->getExpectedRights(), 'r');
     $this->assertEquals($f->getName(), 'tao.configuration.filesystem');
     // automatically set.
     $this->assertFalse($f->isOptional());
     $this->assertTrue($f->isReadable());
     $this->setExpectedException('common_configuration_MalformedRightsException');
     $f->setExpectedRights('fail');
     try {
         $f->setExpectedRights('rw');
         $this->pass();
     } catch (common_configuration_MalformedRightsException $e) {
         $this->fail();
     }
 }