function assignMockStorageFactory($storage) { $storageFactory = new Mock_binarypool_storagefactory(); $storageFactory->setReturnValue('getStorage', $storage); binarypool_views::$storageFactory = $storageFactory; }
private static function getStorage($bucket) { if (!self::$storageFactory) { self::$storageFactory = new binarypool_storagefactory(); } return self::$storageFactory->getStorage($bucket); }