public function testFileLockException() { $file = new \Ark4ne\LightQueue\Provider\FileLockable(Config::get('queue.lightqueue.queue_directory') . md5('testFileLockException') . ".queue"); $queue = new FileQueueProvider('testFileLockException'); $file->handle(); $this->assertEquals($queue->getFile()->getPath(), $file->getPath()); $this->assertTrue($file->lock()); $this->assertFalse($queue->push('test')); $this->assertTrue($file->unlock()); $this->assertTrue($queue->push('test')); $this->assertTrue($file->lock()); $this->assertNull($queue->next()); $this->assertTrue($file->unlock()); $this->assertNotNull($queue->next()); }