Skip to content
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

Fixes to "High School Sweethearts" and GitHub actions #575

Merged
merged 3 commits into from
Nov 6, 2023
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion .github/workflows/exercise-tests-phpunit-9.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:

- uses: shivammathur/setup-php@81cd5ae0920b34eef300e1775313071038a53429
with:
version: ${{ matrix.php-version }}
php-version: ${{ matrix.php-version }}
extensions: gmp

- name: Install dependencies
Expand Down
2 changes: 1 addition & 1 deletion config.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
{
"uuid": "d6b00994-36b1-4d2c-9a7f-d55f3cbdf4de",
"slug": "sweethearts",
"name": "Highschool Sweetheats",
"name": "Highschool Sweethearts",
Copy link
Member

@kotp kotp Nov 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch. Does not appear to be available in "problem-specifications" upstream, but I wonder if other exercise tracks have this same issue.

"prerequisites": ["basic-syntax"],
"concepts": ["strings"],
"status": "beta"
Expand Down
10 changes: 10 additions & 0 deletions exercises/concept/sweethearts/HighSchoolSweetheartTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,16 @@ public function testFirstLetterDoesNotChangeCase()
$this->assertEquals('j', $sweetheart->firstLetter('jane'));
}

/**
* @testdox getting the first letter removes whitespace from the name
* @task_id 1
*/
public function testFirstLetterRemovesWhitespace()
{
$sweetheart = new HighSchoolSweetheart();
$this->assertEquals('J', $sweetheart->firstLetter(' Jane'));
}

/**
* @testdox gets the first letter and appends a dot
* @task_id 2
Expand Down