Example #1
0
 public function testWithAfterCursorClonesRequestAndSetsAfterCursor()
 {
     $afterCursor = $this->getFaker()->word;
     $request = new Request();
     $mutated = $request->withAfterCursor($afterCursor);
     $this->assertInstanceOf(Request::class, $mutated);
     $this->assertNotSame($request, $mutated);
     $this->assertSame($afterCursor, $mutated->getAfterCursor());
     $this->assertSame(Request::CURSOR_PAGINATION, $mutated->getPaginationType());
 }