Submit
Path:
~
/
/
usr
/
local
/
psa
/
admin
/
plib
/
modules
/
catalog
/
vendor
/
tedivm
/
stash
/
tests
/
Stash
/
Test
/
Stubs
/
File Content:
DriverUnavailableStub.php
<?php /* * This file is part of the Stash package. * * (c) Robert Hafner <tedivm@tedivm.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PleskCatalog\Stash\Test\Stubs; use Stash; use PleskCatalog\Stash\Driver\AbstractDriver; use PleskCatalog\Stash\Test\Exception\TestException; /** * DriverExceptionStub is used for testing how Stash reacts to thrown errors. Every function but the constructor throws * an exception. * * @package Stash * @author Robert Hafner <tedivm@tedivm.com> * * @codeCoverageIgnore */ class DriverUnavailableStub extends AbstractDriver { protected $store = array(); public function getData($key) { throw new TestException('Test exception for ' . __FUNCTION__ . ' call'); } protected function getKeyIndex($key) { throw new TestException('Test exception for ' . __FUNCTION__ . ' call'); } public function storeData($key, $data, $expiration) { throw new TestException('Test exception for ' . __FUNCTION__ . ' call'); } public function clear($key = null) { throw new TestException('Test exception for ' . __FUNCTION__ . ' call'); } public function purge() { throw new TestException('Test exception for ' . __FUNCTION__ . ' call'); } public function canEnable() { return \false; } public static function isAvailable() { return \false; } }
Submit
FILE
FOLDER
INFO
Name
Size
Permission
Action
DriverCallCheckStub.php
1384 bytes
0644
DriverExceptionStub.php
1560 bytes
0644
DriverUnavailableStub.php
1514 bytes
0644
LoggerStub.php
1821 bytes
0644
PoolGetDriverStub.php
2124 bytes
0644
N4ST4R_ID | Naxtarrr