Skip to content

Commit

Permalink
Update Tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tomasnorre committed Sep 16, 2024
1 parent 462f7d9 commit 0dc8127
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions exercises/practice/phone-number/PhoneNumberTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,12 @@ public function testCleansTheNumberWithMultipleSpaces(): void
}

/**
* uuid 598d8432-0659-4019-a78b-1c6a73691d21
* uuid 2de74156-f646-42b5-8638-0ef1d8b58bc2
* @testdox invalid when 9 digits
*/
public function testInvalidWhen9Digits(): void
{
$this->expectException(InvalidArgumentException::class);
$this->expectExceptionMessage('incorrect number of digits');

new PhoneNumber('123456789');
}
Expand Down Expand Up @@ -84,13 +83,13 @@ public function testValidWhen11DigitsAndStartingWith1EvenWithPunctuation(): void
}

/**
* uuid c6a5f007-895a-4fc5-90bc-a7e70f9b5cad
* uuid 4a1509b7-8953-4eec-981b-c483358ff531
* @testdox invalid when more than 11 digits
*/
public function testInvalidWhenMoreThan11Digits(): void
{
$this->expectException(InvalidArgumentException::class);
$this->expectExceptionMessage('more than 11 digits');
$this->expectExceptionMessageMatches('.* than 11 digits');

new PhoneNumber('321234567890');
}
Expand Down

0 comments on commit 0dc8127

Please sign in to comment.