Esempio n. 1
0
 /**
  * @return LBoxConfigProperties
  * @throws Exception
  */
 public static function getInstance()
 {
     $className = __CLASS__;
     try {
         if (!self::$instance instanceof $className) {
             self::$instance = new $className();
         }
         return self::$instance;
     } catch (Exception $e) {
         throw $e;
     }
 }
Esempio n. 2
0
 public function testGetPropertyContent()
 {
     $content = "testovaci obsah";
     $this->assertType("LBoxConfigItemProperty", $property = LBoxConfigProperties::getInstance()->getCreateItem("phpunit_test", $content));
     LBoxConfigProperties::getInstance()->store();
     $this->assertSame($content, LBoxConfigManagerProperties::gpcn("phpunit_test"));
     $this->assertType("LBoxConfigItemProperty", $property = LBoxConfigManagerProperties::getInstance()->getPropertyByName("phpunit_test"));
     $property->delete();
     LBoxConfigProperties::getInstance()->store();
 }