BakirovRoman

Assert not empty string for PHPUnit TestCase.

Oct 21st, 2021 (edited)
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.26 KB | None | 0 0
  1.     public static function assertNotEmptyString($actual, string $message = ''): void
  2.     {
  3.         parent::assertIsString($actual, $message);
  4.         $constraint = new LogicalNot(new IsEqual(''));
  5.         static::assertThat($actual, $constraint, $message);
  6.     }  
Add Comment
Please, Sign In to add comment