/** * */ public function testGc() { $builder = $this->getQueryBuilder(); $builder->shouldReceive('table')->once()->with('mako_sessions')->andReturn($builder); $builder->shouldReceive('where')->once()->with('expires', '<', time())->andReturn($builder); $builder->shouldReceive('delete')->once(); $connection = $this->getDatabaseConnection(); $connection->shouldReceive('builder')->once()->andReturn($builder); $store = new Database($connection, 'mako_sessions'); $store->gc(123); }