Example #1
0
 /**
  * testFactoryFailNotInterface 
  * 
  * @expectedException OpenID_Store_Exception
  * @return void
  */
 public function testFactoryFailNotInterface()
 {
     $object = OpenID_Store::factory('NotInterface');
 }
Example #2
0
 /**
  * testSetAndGetStore 
  * 
  * @return void
  */
 public function testSetAndGetStore()
 {
     $this->assertInstanceOf('OpenID_Store_CacheLite', OpenID::getStore());
     OpenID::setStore(OpenID_Store::factory('Mock'));
     $this->assertInstanceOf('OpenID_Store_Mock', OpenID::getStore());
 }
Example #3
0
 /**
  * Gets the OpenID_Store_Interface instance.  If none has been set, then the 
  * default store is used (CacheLite).
  * 
  * @return OpenID_Store_Interface
  */
 public static function getStore()
 {
     if (!self::$store instanceof OpenID_Store_Interface) {
         self::$store = OpenID_Store::factory();
     }
     return self::$store;
 }