diff --git a/bin/auto-sync.txt b/bin/auto-sync.txt index 65287bdf..16e02841 100644 --- a/bin/auto-sync.txt +++ b/bin/auto-sync.txt @@ -64,6 +64,7 @@ proverb queen-attack rail-fence-cipher raindrops +resistor-color resistor-color-duo reverse-string rna-transcription diff --git a/exercises/practice/resistor-color/.meta/config.json b/exercises/practice/resistor-color/.meta/config.json index a5724bb2..ae8dee5a 100644 --- a/exercises/practice/resistor-color/.meta/config.json +++ b/exercises/practice/resistor-color/.meta/config.json @@ -3,7 +3,8 @@ "camilopayan" ], "contributors": [ - "MichaelBunker" + "MichaelBunker", + "manupereiraduarte" ], "files": { "solution": [ diff --git a/exercises/practice/resistor-color/.meta/example.php b/exercises/practice/resistor-color/.meta/example.php index 6bbec12f..acef6ed2 100644 --- a/exercises/practice/resistor-color/.meta/example.php +++ b/exercises/practice/resistor-color/.meta/example.php @@ -1,27 +1,5 @@ . - * - * To disable strict typing, comment out the directive below. - */ - declare(strict_types=1); function getAllColors(): array diff --git a/exercises/practice/resistor-color/.meta/tests.toml b/exercises/practice/resistor-color/.meta/tests.toml new file mode 100644 index 00000000..9d4ee973 --- /dev/null +++ b/exercises/practice/resistor-color/.meta/tests.toml @@ -0,0 +1,22 @@ +# This is an auto-generated file. +# +# Regenerating this file via `configlet sync` will: +# - Recreate every `description` key/value pair +# - Recreate every `reimplements` key/value pair, where they exist in problem-specifications +# - Remove any `include = true` key/value pair (an omitted `include` key implies inclusion) +# - Preserve any other key/value pair +# +# As user-added comments (using the # character) will be removed when this file +# is regenerated, comments can be added via a `comment` key. + +[49eb31c5-10a8-4180-9f7f-fea632ab87ef] +description = "Color codes -> Black" + +[0a4df94b-92da-4579-a907-65040ce0b3fc] +description = "Color codes -> White" + +[5f81608d-f36f-4190-8084-f45116b6f380] +description = "Color codes -> Orange" + +[581d68fa-f968-4be2-9f9d-880f2fb73cf7] +description = "Colors" diff --git a/exercises/practice/resistor-color/ResistorColorTest.php b/exercises/practice/resistor-color/ResistorColorTest.php index 6283fb72..3761059f 100644 --- a/exercises/practice/resistor-color/ResistorColorTest.php +++ b/exercises/practice/resistor-color/ResistorColorTest.php @@ -1,29 +1,8 @@ . - * - * To disable strict typing, comment out the directive below. - */ - declare(strict_types=1); +use PHPUnit\Framework\Attributes\TestDox; use PHPUnit\Framework\TestCase; class ResistorColorTest extends TestCase @@ -33,6 +12,10 @@ public static function setUpBeforeClass(): void require_once 'ResistorColor.php'; } + /** + * uuid: 581d68fa-f968-4be2-9f9d-880f2fb73cf7 + */ + #[TestDox('Colors')] public function testColors(): void { $this->assertEquals([ @@ -49,16 +32,28 @@ public function testColors(): void ], getAllColors()); } + /** + * uuid: 49eb31c5-10a8-4180-9f7f-fea632ab87ef + */ + #[TestDox('Black')] public function testBlackColorCode(): void { $this->assertEquals(0, colorCode("black")); } + /** + * uuid: 5f81608d-f36f-4190-8084-f45116b6f380 + */ + #[TestDox('Orange')] public function testOrangeColorCode(): void { $this->assertEquals(3, colorCode("orange")); } + /** + * uuid: 0a4df94b-92da-4579-a907-65040ce0b3fc + */ + #[TestDox('White')] public function testWhiteColorCode(): void { $this->assertEquals(9, colorCode("white"));