public function getAdapter() { $pool = $this->getMock('\\Hoard\\PoolInterface'); $adapter = new Transient(); $adapter->setPool($pool); return $adapter; }
/** * Delete all properties by given array of property names. * * @param array $transientProperties * @param bool $expiredOnly * @return int */ public function deleteByProperty(array $transientProperties, $expiredOnly = true) { if ($transientProperties) { $query = Transient::whereIn('property', $transientProperties); if ($expiredOnly) { $query->expired(); } return $query->delete(); } // If no arguments are provided, dont delete anything. return 0; }