/** * Test create slicer. */ public function testCreateSlicer() { $slicer = Factory::create(); $this->assertNotNull($slicer); $this->assertInstanceOf(Config::class, $slicer->getConfig()); }
/** * Returns the current Slicer instance. * * @param bool|TRUE $required * * @return Slicer */ public function getSlicer($required = TRUE) { if (NULL === $this->slicer) { try { $this->slicer = Factory::create(); } catch (InvalidArgumentException $e) { if ($required && NULL !== $this->output) { $this->output->writeln($e->getMessage()); exit(1); } } } return $this->slicer; }