Example #1
0
 public function testWithBeforeCursorClonesRequestAndSetsBeforeCursor()
 {
     $beforeCursor = $this->getFaker()->word;
     $request = new Request();
     $mutated = $request->withBeforeCursor($beforeCursor);
     $this->assertInstanceOf(Request::class, $mutated);
     $this->assertNotSame($request, $mutated);
     $this->assertSame($beforeCursor, $mutated->getBeforeCursor());
     $this->assertSame(Request::CURSOR_PAGINATION, $mutated->getPaginationType());
 }