diff --git a/tests/Core/Config/GeneratorArgTest.php b/tests/Core/Config/GeneratorArgTest.php new file mode 100644 index 0000000000..f0b52db157 --- /dev/null +++ b/tests/Core/Config/GeneratorArgTest.php @@ -0,0 +1,79 @@ +assertSame($generatorName, $config->generator); + + }//end testGenerators() + + + /** + * Data provider for testGenerators(). + * + * @see self::testGenerators() + * + * @return array> + */ + public static function dataGeneratorNames() + { + return [ + ['Text'], + ['HTML'], + ['Markdown'], + ]; + + }//end dataGeneratorNames() + + + /** + * Ensure that only the first argument is processed and others are ignored. + * + * @return void + */ + public function testOnlySetOnce() + { + $config = new ConfigDouble( + [ + '--generator=Text', + '--generator=HTML', + '--generator=InvalidGenerator', + ] + ); + + $this->assertSame('Text', $config->generator); + + }//end testOnlySetOnce() + + +}//end class