public function fire() { $themeName = $this->ask('Please enter the theme name in the following format: vendor/name'); list($vendor, $name) = $this->separateVendorAndName($themeName); $type = $this->choice('Would you like to create a front end or backend theme ?', ['Frontend', 'Backend'], 0); $this->themeScaffold->setName($name)->setVendor($vendor)->forType(strtolower($type))->generate(); $this->info("Generated a fresh theme called [{$themeName}]. You'll find it in the Themes/ folder"); }
/** @test */ public function it_throws_exception_if_no_vendor_provided() { $this->setExpectedException(\InvalidArgumentException::class, 'You must provide a vendor name'); $this->scaffold->setName($this->testThemeName)->forType('frontend')->setVendor('')->generate(); }