File tree 2 files changed +28
-0
lines changed
tests/Type/WebMozartAssert/data
2 files changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -57,6 +57,8 @@ This extension specifies types of values passed to:
57
57
* ` Assert::notFalse `
58
58
* ` Assert::null `
59
59
* ` Assert::notNull `
60
+ * ` Assert::isEmpty `
61
+ * ` Assert::notEmpty `
60
62
* ` Assert::eq `
61
63
* ` Assert::notEq `
62
64
* ` Assert::same `
Original file line number Diff line number Diff line change @@ -44,6 +44,32 @@ public function notNull(?int $a): void
44
44
assertType ('int ' , $ a );
45
45
}
46
46
47
+ /** @param string|null $c */
48
+ public function isEmpty (string $ a , $ b , $ c ): void
49
+ {
50
+ Assert::isEmpty ($ a );
51
+ assertType ("''|'0' " , $ a );
52
+
53
+ Assert::isEmpty ($ b );
54
+ assertType ("0|0.0|''|'0'|array{}|false|null " , $ b );
55
+
56
+ Assert::isEmpty ($ c );
57
+ assertType ("''|'0'|null " , $ c );
58
+ }
59
+
60
+ /** @param string|null $c */
61
+ public function notEmpty (string $ a , $ b , $ c ): void
62
+ {
63
+ Assert::notEmpty ($ a );
64
+ assertType ('non-falsy-string ' , $ a );
65
+
66
+ Assert::notEmpty ($ b );
67
+ assertType ("mixed~0|0.0|''|'0'|array{}|false|null " , $ b );
68
+
69
+ Assert::notEmpty ($ c );
70
+ assertType ('non-falsy-string ' , $ c );
71
+ }
72
+
47
73
/**
48
74
* @param non-empty-string $b2
49
75
*/
You can’t perform that action at this time.
0 commit comments