setUserFile() 공개 메소드

public setUserFile ( $value )
예제 #1
0
 public function testUserFile()
 {
     $userManager = new TUserManager();
     try {
         $userManager->setUserFile('invalidFile');
         self::fail('Exception TConfigurationException not thrown');
     } catch (TConfigurationException $e) {
     }
     $userManager = null;
     if (is_writable(dirname(__FILE__))) {
         self::$config->saveToFile(dirname(__FILE__) . '/users.xml');
         $userManager = new TUserManager();
         $userManager->setUserFile('App.users');
         $userManager->init(new TXmlDocument());
         // Empty config
         self::assertEquals(dirname(__FILE__) . '/users.xml', $userManager->getUserFile());
         unlink(dirname(__FILE__) . '/users.xml');
         $userManager = null;
     }
     $userManager = new TUserManager();
     $userManager->init(self::$config);
     try {
         $userManager->setUserFile('App.users');
         self::fail('Exception TInvalidOperationException not thrown');
     } catch (TInvalidOperationException $e) {
     }
 }