コード例 #1
0
 public function testClearQueue()
 {
     $reader = new \Magento\Update\Queue\Reader($this->tmpQueueFilePath);
     $reader->clearQueue();
     $expectedQueueFileContent = '';
     $actualQueueFileContent = file_get_contents($this->tmpQueueFilePath);
     $this->assertEquals($expectedQueueFileContent, $actualQueueFileContent);
 }
コード例 #2
0
 public function testReadInvalidFileFormat()
 {
     $reader = new \Magento\Update\Queue\Reader($this->invalidQueueFilePath);
     $this->setExpectedException('\\RuntimeException', "Content of \"{$this->invalidQueueFilePath}\" must be a valid JSON.");
     $reader->read();
 }