| @@ 74-83 (lines=10) @@ | ||
| 71 | * |
|
| 72 | * @return $this |
|
| 73 | */ |
|
| 74 | public function isEmpty($failMessage = null) |
|
| 75 | { |
|
| 76 | if (($actual = $this->valueAsCollection()->count()) === 0) { |
|
| 77 | $this->pass(); |
|
| 78 | } else { |
|
| 79 | $this->fail($failMessage ?: $this->getLocale()->_('%s is not empty', $this, $actual)); |
|
| 80 | } |
|
| 81 | ||
| 82 | return $this; |
|
| 83 | } |
|
| 84 | ||
| 85 | /** |
|
| 86 | * @param string $failMessage |
|
| @@ 90-99 (lines=10) @@ | ||
| 87 | * |
|
| 88 | * @return $this |
|
| 89 | */ |
|
| 90 | public function isNotEmpty($failMessage = null) |
|
| 91 | { |
|
| 92 | if ($this->valueAsCollection()->count() > 0) { |
|
| 93 | $this->pass(); |
|
| 94 | } else { |
|
| 95 | $this->fail($failMessage ?: $this->_('%s is empty', $this)); |
|
| 96 | } |
|
| 97 | ||
| 98 | return $this; |
|
| 99 | } |
|
| 100 | ||
| 101 | /** |
|
| 102 | * @return $this |
|