Add toBeTruthy

This commit is contained in:
Esteban
2021-08-03 20:54:56 -04:00
parent ce7a7649a2
commit cffde4564d
2 changed files with 36 additions and 0 deletions

View File

@ -205,6 +205,16 @@ final class Expectation
return $this;
}
/**
* Asserts that the value is truthy.
*/
public function toBeTruthy(): Expectation
{
Assert::assertTrue((bool) $this->value);
return $this;
}
/**
* Asserts that the value is false.
*/