It creates a new module directory
This commit is contained in:
parent
0ece90c6cf
commit
0e5fbd2cec
|
@ -36,6 +36,8 @@ class GenerateDrupal7Command extends Command
|
||||||
|
|
||||||
$this->ensureDirectoryDoesNotExist();
|
$this->ensureDirectoryDoesNotExist();
|
||||||
|
|
||||||
|
mkdir($this->moduleName);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -24,4 +24,17 @@ class GenerateDrupal7ModuleCommandTest extends TestCase
|
||||||
|
|
||||||
rmdir('my-existing-drupal-module');
|
rmdir('my-existing-drupal-module');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** @test */
|
||||||
|
public function it_creates_a_new_module_directory()
|
||||||
|
{
|
||||||
|
$commandTester = new CommandTester(new GenerateDrupal7Command());
|
||||||
|
$commandTester->execute([
|
||||||
|
'module-name' => 'my-new-drupal-module',
|
||||||
|
]);
|
||||||
|
|
||||||
|
$this->assertTrue(is_dir('my-new-drupal-module'));
|
||||||
|
|
||||||
|
rmdir('my-new-drupal-module');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue