Skip to content

Sync pig latin #888

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 16, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 35 additions & 25 deletions exercises/practice/pig-latin/.meta/tests.toml
Original file line number Diff line number Diff line change
@@ -1,69 +1,79 @@
# This is an auto-generated file. Regular comments will be removed when this
# file is regenerated. Regenerating will not touch any manually added keys,
# so comments can be added in a "comment" key.
# 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.

[11567f84-e8c6-4918-aedb-435f0b73db57]
description = "word beginning with a"
description = "ay is added to words that start with vowels -> word beginning with a"

[f623f581-bc59-4f45-9032-90c3ca9d2d90]
description = "word beginning with e"
description = "ay is added to words that start with vowels -> word beginning with e"

[7dcb08b3-23a6-4e8a-b9aa-d4e859450d58]
description = "word beginning with i"
description = "ay is added to words that start with vowels -> word beginning with i"

[0e5c3bff-266d-41c8-909f-364e4d16e09c]
description = "word beginning with o"
description = "ay is added to words that start with vowels -> word beginning with o"

[614ba363-ca3c-4e96-ab09-c7320799723c]
description = "word beginning with u"
description = "ay is added to words that start with vowels -> word beginning with u"

[bf2538c6-69eb-4fa7-a494-5a3fec911326]
description = "word beginning with a vowel and followed by a qu"
description = "ay is added to words that start with vowels -> word beginning with a vowel and followed by a qu"

[e5be8a01-2d8a-45eb-abb4-3fcc9582a303]
description = "word beginning with p"
description = "first letter and ay are moved to the end of words that start with consonants -> word beginning with p"

[d36d1e13-a7ed-464d-a282-8820cb2261ce]
description = "word beginning with k"
description = "first letter and ay are moved to the end of words that start with consonants -> word beginning with k"

[d838b56f-0a89-4c90-b326-f16ff4e1dddc]
description = "word beginning with x"
description = "first letter and ay are moved to the end of words that start with consonants -> word beginning with x"

[bce94a7a-a94e-4e2b-80f4-b2bb02e40f71]
description = "word beginning with q without a following u"
description = "first letter and ay are moved to the end of words that start with consonants -> word beginning with q without a following u"

[e59dbbe8-ccee-4619-a8e9-ce017489bfc0]
description = "first letter and ay are moved to the end of words that start with consonants -> word beginning with consonant and vowel containing qu"

[c01e049a-e3e2-451c-bf8e-e2abb7e438b8]
description = "word beginning with ch"
description = "some letter clusters are treated like a single consonant -> word beginning with ch"

[9ba1669e-c43f-4b93-837a-cfc731fd1425]
description = "word beginning with qu"
description = "some letter clusters are treated like a single consonant -> word beginning with qu"

[92e82277-d5e4-43d7-8dd3-3a3b316c41f7]
description = "word beginning with qu and a preceding consonant"
description = "some letter clusters are treated like a single consonant -> word beginning with qu and a preceding consonant"

[79ae4248-3499-4d5b-af46-5cb05fa073ac]
description = "word beginning with th"
description = "some letter clusters are treated like a single consonant -> word beginning with th"

[e0b3ae65-f508-4de3-8999-19c2f8e243e1]
description = "word beginning with thr"
description = "some letter clusters are treated like a single consonant -> word beginning with thr"

[20bc19f9-5a35-4341-9d69-1627d6ee6b43]
description = "word beginning with sch"
description = "some letter clusters are treated like a single consonant -> word beginning with sch"

[54b796cb-613d-4509-8c82-8fbf8fc0af9e]
description = "word beginning with yt"
description = "some letter clusters are treated like a single vowel -> word beginning with yt"

[8c37c5e1-872e-4630-ba6e-d20a959b67f6]
description = "word beginning with xr"
description = "some letter clusters are treated like a single vowel -> word beginning with xr"

[a4a36d33-96f3-422c-a233-d4021460ff00]
description = "y is treated like a consonant at the beginning of a word"
description = "position of y in a word determines if it is a consonant or a vowel -> y is treated like a consonant at the beginning of a word"

[adc90017-1a12-4100-b595-e346105042c7]
description = "y is treated like a vowel at the end of a consonant cluster"
description = "position of y in a word determines if it is a consonant or a vowel -> y is treated like a vowel at the end of a consonant cluster"

[29b4ca3d-efe5-4a95-9a54-8467f2e5e59a]
description = "y as second letter in two letter word"
description = "position of y in a word determines if it is a consonant or a vowel -> y as second letter in two letter word"

[44616581-5ce3-4a81-82d0-40c7ab13d2cf]
description = "a whole phrase"
description = "phrases are translated -> a whole phrase"
53 changes: 31 additions & 22 deletions exercises/practice/pig-latin/PigLatinTest.php
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@ public static function setUpBeforeClass(): void

/**
* uuid 11567f84-e8c6-4918-aedb-435f0b73db57
* @testdox ay is added to words that start with vowels - word beginning with a
* @testdox ay is added to words that start with vowels -> word beginning with a
*/
public function testWordBeginningWithA(): void
{
@@ -20,7 +20,7 @@ public function testWordBeginningWithA(): void

/**
* uuid f623f581-bc59-4f45-9032-90c3ca9d2d90
* @testdox ay is added to words that start with vowels - word beginning with e
* @testdox ay is added to words that start with vowels -> word beginning with e
*/
public function testWordBeginningWithE(): void
{
@@ -29,7 +29,7 @@ public function testWordBeginningWithE(): void

/**
* uuid 7dcb08b3-23a6-4e8a-b9aa-d4e859450d58
* @testdox ay is added to words that start with vowels - word beginning with i
* @testdox ay is added to words that start with vowels -> word beginning with i
*/
public function testWordBeginningWithI(): void
{
@@ -38,7 +38,7 @@ public function testWordBeginningWithI(): void

/**
* uuid 0e5c3bff-266d-41c8-909f-364e4d16e09c
* @testdox ay is added to words that start with vowels - word beginning with o
* @testdox ay is added to words that start with vowels -> word beginning with o
*/
public function testWordBeginningWithO(): void
{
@@ -47,7 +47,7 @@ public function testWordBeginningWithO(): void

/**
* uuid 614ba363-ca3c-4e96-ab09-c7320799723c
* @testdox ay is added to words that start with vowels - word beginning with u
* @testdox ay is added to words that start with vowels -> word beginning with u
*/
public function testWordBeginningWithU(): void
{
@@ -56,7 +56,7 @@ public function testWordBeginningWithU(): void

/**
* uuid bf2538c6-69eb-4fa7-a494-5a3fec911326
* @testdox ay is added to words that start with vowels - word beginning with a vowel and followed by a qu
* @testdox ay is added to words that start with vowels -> word beginning with a vowel and followed by a qu
*/
public function testWordBeginningVowelFollowedByQu(): void
{
@@ -65,7 +65,7 @@ public function testWordBeginningVowelFollowedByQu(): void

/**
* uuid e5be8a01-2d8a-45eb-abb4-3fcc9582a303
* @testdox First letter and ay are moved to the end of words that start with consonants - word beginning with p
* @testdox First letter and ay are moved to the end of words that start with consonants -> word beginning with p
*/
public function testWordBeginningWithP(): void
{
@@ -74,7 +74,7 @@ public function testWordBeginningWithP(): void

/**
* uuid d36d1e13-a7ed-464d-a282-8820cb2261ce
* @testdox First letter and ay are moved to the end of words that start with consonants - word beginning with k
* @testdox First letter and ay are moved to the end of words that start with consonants -> word beginning with k
*/
public function testWordBeginningWithK(): void
{
@@ -83,7 +83,7 @@ public function testWordBeginningWithK(): void

/**
* uuid d838b56f-0a89-4c90-b326-f16ff4e1dddc
* @testdox First letter and ay are moved to the end of words that start with consonants - word beginning with x
* @testdox First letter and ay are moved to the end of words that start with consonants -> word beginning with x
*/
public function testWordBeginningWithX(): void
{
@@ -92,16 +92,25 @@ public function testWordBeginningWithX(): void

/**
* uuid bce94a7a-a94e-4e2b-80f4-b2bb02e40f71
* @testdox First letter and ay are moved to the end of words that start with consonants - word beginning with q without a following u
* @testdox First letter and ay are moved to the end of words that start with consonants -> word beginning with q without a following u
*/
public function testWordBeginningWithQWithoutAFollowingU(): void
{
$this->assertEquals("atqay", translate("qat"));
}

/**
* uuid e59dbbe8-ccee-4619-a8e9-ce017489bfc0
* @testdox First letter and ay are moved to the end of words that start with consonants -> word beginning with consonant and vowel containing qu
*/
public function testWordBeginningWithConsonantAndVowelContainingQu(): void
{
$this->assertEquals("iquidlay", translate("liquid"));
}

/**
* uuid c01e049a-e3e2-451c-bf8e-e2abb7e438b8
* @testdox Some letter clusters are treated like a single consonant - word beginning with ch
* @testdox Some letter clusters are treated like a single consonant -> word beginning with ch
*/
public function testWordBeginningWithCh(): void
{
@@ -110,7 +119,7 @@ public function testWordBeginningWithCh(): void

/**
* uuid 9ba1669e-c43f-4b93-837a-cfc731fd1425
* @testdox Some letter clusters are treated like a single consonant - word beginning with qu
* @testdox Some letter clusters are treated like a single consonant -> word beginning with qu
*/
public function testWordBeginningWithQu(): void
{
@@ -119,7 +128,7 @@ public function testWordBeginningWithQu(): void

/**
* uuid 92e82277-d5e4-43d7-8dd3-3a3b316c41f7
* @testdox Some letter clusters are treated like a single consonant - word beginning with qu and a preceding consonant
* @testdox Some letter clusters are treated like a single consonant -> word beginning with qu and a preceding consonant
*/
public function testWordBeginningWithQuAndAPrecedingConsonant(): void
{
@@ -128,7 +137,7 @@ public function testWordBeginningWithQuAndAPrecedingConsonant(): void

/**
* uuid 79ae4248-3499-4d5b-af46-5cb05fa073ac
* @testdox Some letter clusters are treated like a single consonant - word beginning with th
* @testdox Some letter clusters are treated like a single consonant -> word beginning with th
*/
public function testWordBeginningWithTh(): void
{
@@ -137,7 +146,7 @@ public function testWordBeginningWithTh(): void

/**
* uuid e0b3ae65-f508-4de3-8999-19c2f8e243e1
* @testdox Some letter clusters are treated like a single consonant - word beginning with thr
* @testdox Some letter clusters are treated like a single consonant -> word beginning with thr
*/
public function testWordBeginningWithThr(): void
{
@@ -146,7 +155,7 @@ public function testWordBeginningWithThr(): void

/**
* uuid 20bc19f9-5a35-4341-9d69-1627d6ee6b43
* @testdox Some letter clusters are treated like a single consonant - word beginning with sch
* @testdox Some letter clusters are treated like a single consonant -> word beginning with sch
*/
public function testWordBeginningWithSch(): void
{
@@ -155,7 +164,7 @@ public function testWordBeginningWithSch(): void

/**
* uuid 54b796cb-613d-4509-8c82-8fbf8fc0af9e
* @testdox Some letter clusters are treated like a single vowel - word beginning with yt
* @testdox Some letter clusters are treated like a single vowel -> word beginning with yt
*/
public function testWordBeginningWithYt(): void
{
@@ -164,7 +173,7 @@ public function testWordBeginningWithYt(): void

/**
* uuid 8c37c5e1-872e-4630-ba6e-d20a959b67f6
* @testdox Some letter clusters are treated like a single vowel - word beginning with xr
* @testdox Some letter clusters are treated like a single vowel -> word beginning with xr
*/
public function testWordBeginningWithXr(): void
{
@@ -174,7 +183,7 @@ public function testWordBeginningWithXr(): void

/**
* uuid a4a36d33-96f3-422c-a233-d4021460ff00
* @testdox Position of y in a word determines if it is a consonant or a vowel - y is treated like a consonant at the beginning of a word
* @testdox Position of y in a word determines if it is a consonant or a vowel -> y is treated like a consonant at the beginning of a word
*/
public function testWordBeginningWithY(): void
{
@@ -183,7 +192,7 @@ public function testWordBeginningWithY(): void

/**
* uuid adc90017-1a12-4100-b595-e346105042c7
* @testdox Position of y in a word determines if it is a consonant or a vowel - y is treated like a vowel at the end of a consonant cluster
* @testdox Position of y in a word determines if it is a consonant or a vowel -> y is treated like a vowel at the end of a consonant cluster
*/
public function testWordBeginningWithConsonantClusterThenY(): void
{
@@ -192,7 +201,7 @@ public function testWordBeginningWithConsonantClusterThenY(): void

/**
* uuid 29b4ca3d-efe5-4a95-9a54-8467f2e5e59a
* @testdox Position of y in a word determines if it is a consonant or a vowel - y as second letter in two letter word
* @testdox Position of y in a word determines if it is a consonant or a vowel -> y as second letter in two letter word
*/
public function testTwoLetterWordWithY(): void
{
@@ -202,7 +211,7 @@ public function testTwoLetterWordWithY(): void

/**
* uuid 44616581-5ce3-4a81-82d0-40c7ab13d2cf
* @testdox Phrases are translated - a whole phrase
* @testdox Phrases are translated -> a whole phrase
*/
public function testAWholePhrase(): void
{