Skip to content
This repository has been archived by the owner on Sep 20, 2021. It is now read-only.

Commit

Permalink
feat(option) Update the unwrap default message.
Browse files Browse the repository at this point in the history
  • Loading branch information
Hywan committed Aug 18, 2017
2 parents d5c59f6 + 8b7ff61 commit da49a2c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Option.php
Expand Up @@ -219,7 +219,7 @@ public function expect(string $errorMessage)
*/
public function unwrap()
{
return $this->expect('Unwrap a null value.');
return $this->expect('Called `' . __METHOD__ . '` on a none value.');
}

/**
Expand Down
4 changes: 2 additions & 2 deletions Test/Unit/Option.php
Expand Up @@ -191,8 +191,8 @@ public function case_none_unwrap()
->exception(function () use ($option) {
$option->unwrap();
})
->isInstanceOf(RuntimeException::class)
->hasMessage('Unwrap a null value.');
->isInstanceOf(RuntimeException::class)
->hasMessage('Called `' . SUT::class . '::unwrap` on a none value.');
}

public function case_some_unwrap_or()
Expand Down

0 comments on commit da49a2c

Please sign in to comment.