Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
Signed-off-by: Mior Muhammad Zaki <crynobone@gmail.com>
  • Loading branch information
crynobone committed Sep 23, 2024
1 parent 41cde8c commit 6cce8cd
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion src/Concerns/HandlesAssertions.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,24 @@

trait HandlesAssertions
{
/**
* Mark the test as skipped when condition is not equivalent to true.
*
* @param (\Closure($this): bool)|bool|null $condition
* @param string $message
* @return void
*/
protected function markTestSkippedUnless($condition, string $message): void
{
if (!value($condition)) {
$this->markTestSkipped($message);
}
}

/**
* Mark the test as skipped when condition is equivalent to true.
*
* @param (\Closure($this): mixed)|mixed|null $condition
* @param (\Closure($this): bool)|bool|null $condition
* @param string $message
* @return void
*/
Expand Down

0 comments on commit 6cce8cd

Please sign in to comment.