|
@@ 178-185 (lines=8) @@
|
| 175 |
|
}; |
| 176 |
|
} |
| 177 |
|
|
| 178 |
|
public function it_create_empty_array_loop_builder() |
| 179 |
|
{ |
| 180 |
|
$closure = function(NotifynderBuilder $builder,$data,$key) |
| 181 |
|
{ |
| 182 |
|
return $builder->to(1)->from(2)->url('notifynder.io')->category(1); |
| 183 |
|
}; |
| 184 |
|
$this->shouldThrow(IterableIsEmptyException::class)->during('loop', [[], $closure]); |
| 185 |
|
} |
| 186 |
|
|
| 187 |
|
public function it_create_empty_collection_loop_builder() |
| 188 |
|
{ |
|
@@ 187-194 (lines=8) @@
|
| 184 |
|
$this->shouldThrow(IterableIsEmptyException::class)->during('loop', [[], $closure]); |
| 185 |
|
} |
| 186 |
|
|
| 187 |
|
public function it_create_empty_collection_loop_builder() |
| 188 |
|
{ |
| 189 |
|
$closure = function(NotifynderBuilder $builder,$data,$key) |
| 190 |
|
{ |
| 191 |
|
return $builder->to(1)->from(2)->url('notifynder.io')->category(1); |
| 192 |
|
}; |
| 193 |
|
$this->shouldThrow(IterableIsEmptyException::class)->during('loop', [new Collection([]), $closure]); |
| 194 |
|
} |
| 195 |
|
|
| 196 |
|
public function it_create_not_iterable_loop_builder() |
| 197 |
|
{ |
|
@@ 196-203 (lines=8) @@
|
| 193 |
|
$this->shouldThrow(IterableIsEmptyException::class)->during('loop', [new Collection([]), $closure]); |
| 194 |
|
} |
| 195 |
|
|
| 196 |
|
public function it_create_not_iterable_loop_builder() |
| 197 |
|
{ |
| 198 |
|
$closure = function(NotifynderBuilder $builder,$data,$key) |
| 199 |
|
{ |
| 200 |
|
return $builder->to(1)->from(2)->url('notifynder.io')->category(1); |
| 201 |
|
}; |
| 202 |
|
$this->shouldThrow(EntityNotIterableException::class)->during('loop', ['hello world', $closure]); |
| 203 |
|
} |
| 204 |
|
} |
| 205 |
|
|