public function testCmd() { $fileQueue = new FileQueueProvider(null); $fileQueue->push('null'); $fileQueue->push('null1'); $fileQueue->push('null2'); $cmd = new LightQueueCommand(); $this->setExpectedException('Ark4ne\\LightQueue\\Exception\\LightQueueException', 'LightQueueCommand data invalid'); $this->assertEquals(0, $cmd->run(new IConsole(), new OConsole())); $this->assertEquals(2, $fileQueue->queueSize()); $this->assertEquals('null1', $fileQueue->next()); $this->assertEquals(1, $fileQueue->queueSize()); $this->assertEquals('null2', $fileQueue->next()); $this->assertFalse($fileQueue->hasNext()); }