We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent af66f94 commit 7e316c8Copy full SHA for 7e316c8
tests/DynamoDbNonCompositeModelTest.php
@@ -687,6 +687,22 @@ public function testChunkScanCondition()
687
$this->assertEquals(3, $total_results);
688
}
689
690
+ public function testChunkEarlyReturn()
691
+ {
692
+ $this->seed(['name' => ['S' => 'Foo']]);
693
+ $this->seed(['name' => ['S' => 'Foo2']]);
694
+ $this->seed(['name' => ['S' => 'Foo3']]);
695
+
696
+ $iteration = 1;
697
698
+ $this->testModel->chunk(2, function () use (&$iteration) {
699
+ $iteration++;
700
+ return false;
701
+ });
702
703
+ $this->assertEquals(2, $iteration);
704
+ }
705
706
public function testStaticMethods()
707
{
708
$item = $this->seed(['name' => ['S' => 'Foo'], 'description' => ['S' => 'Bar']]);
0 commit comments