diff --git a/tests/Store/PostgresDriver/ICursorTest.php b/tests/Store/PostgresDriver/ICursorTest.php index a022e020582f285a602ecf0c7adfed3dd700782b..7c4923e59e2650f6ae37fc83348046d2dc26b97e 100644 --- a/tests/Store/PostgresDriver/ICursorTest.php +++ b/tests/Store/PostgresDriver/ICursorTest.php @@ -218,6 +218,14 @@ abstract class ICursorTest extends BaseTest Assert::same(5, $data["n"]); } + public function test_givenInitialPosition_whenFetchMinus2_thenGetSecondFromRight() + { + $this->uut->moveTo(234); // wherever + + $data = $this->uut->fetchOneAt(-2); + Assert::same(999, $data["n"]); + } + // fetchOneBy() public function test_givenInitialPosition_whenFetchCurrent_thenGetNull()