From 3890b4543cd4d8a9e646df906ddc784a6869c259 Mon Sep 17 00:00:00 2001 From: manupereiraduarte <98099@sistemas.frc.utn.edu.ar> Date: Thu, 4 Jun 2026 23:42:23 +0000 Subject: [PATCH 1/3] Sync resistor-color #966 --- bin/auto-sync.txt | 1 + .../practice/resistor-color/.meta/config.json | 1 + .../practice/resistor-color/.meta/example.php | 22 ----------- .../practice/resistor-color/.meta/tests.toml | 22 +++++++++++ .../resistor-color/ResistorColorTest.php | 38 ++++++++----------- 5 files changed, 40 insertions(+), 44 deletions(-) create mode 100644 exercises/practice/resistor-color/.meta/tests.toml 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..84eaf20f 100644 --- a/exercises/practice/resistor-color/.meta/config.json +++ b/exercises/practice/resistor-color/.meta/config.json @@ -3,6 +3,7 @@ "camilopayan" ], "contributors": [ + "manupereiraduarte", "MichaelBunker" ], "files": { 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..0d9e77f7 100644 --- a/exercises/practice/resistor-color/ResistorColorTest.php +++ b/exercises/practice/resistor-color/ResistorColorTest.php @@ -1,27 +1,5 @@ . - * - * To disable strict typing, comment out the directive below. - */ - declare(strict_types=1); use PHPUnit\Framework\TestCase; @@ -33,6 +11,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 +31,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")); From 009ae1a24b0a080025a47c5dc2935dae24bcb7e3 Mon Sep 17 00:00:00 2001 From: manupereiraduarte <98099@sistemas.frc.utn.edu.ar> Date: Thu, 4 Jun 2026 23:51:08 +0000 Subject: [PATCH 2/3] Add missing TestDox import --- exercises/practice/resistor-color/ResistorColorTest.php | 1 + 1 file changed, 1 insertion(+) diff --git a/exercises/practice/resistor-color/ResistorColorTest.php b/exercises/practice/resistor-color/ResistorColorTest.php index 0d9e77f7..3761059f 100644 --- a/exercises/practice/resistor-color/ResistorColorTest.php +++ b/exercises/practice/resistor-color/ResistorColorTest.php @@ -2,6 +2,7 @@ declare(strict_types=1); +use PHPUnit\Framework\Attributes\TestDox; use PHPUnit\Framework\TestCase; class ResistorColorTest extends TestCase From 78ad106df6f7026885604121fc3902c2845c37e2 Mon Sep 17 00:00:00 2001 From: manupereiraduarte <98099@sistemas.frc.utn.edu.ar> Date: Fri, 5 Jun 2026 21:30:35 +0000 Subject: [PATCH 3/3] Fix contributor order in config.json --- exercises/practice/resistor-color/.meta/config.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/exercises/practice/resistor-color/.meta/config.json b/exercises/practice/resistor-color/.meta/config.json index 84eaf20f..ae8dee5a 100644 --- a/exercises/practice/resistor-color/.meta/config.json +++ b/exercises/practice/resistor-color/.meta/config.json @@ -3,8 +3,8 @@ "camilopayan" ], "contributors": [ - "manupereiraduarte", - "MichaelBunker" + "MichaelBunker", + "manupereiraduarte" ], "files": { "solution": [