File tree Expand file tree Collapse file tree 2 files changed +14
-5
lines changed
tests/Unit/Traits/Configuration Expand file tree Collapse file tree 2 files changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -107,6 +107,13 @@ public function setPerPage(int $perPage): self
107107 return $ this ;
108108 }
109109
110+ public function unsetPerPage (): self
111+ {
112+ $ this ->perPage = null ;
113+
114+ return $ this ;
115+ }
116+
110117 public function setPaginationMethod (string $ paginationMethod ): self
111118 {
112119 $ this ->paginationMethod = $ paginationMethod ;
Original file line number Diff line number Diff line change @@ -113,10 +113,12 @@ public function test_can_set_per_page_manually(): void
113113
114114 public function test_can_set_default_per_page (): void
115115 {
116- $ this ->assertSame (10 , $ this ->unpaginatedTable ->getPerPage ());
117- $ this ->unpaginatedTable ->setDefaultPerPage (50 );
118- $ this ->assertSame (50 , $ this ->unpaginatedTable ->getPerPage ());
119- $ this ->unpaginatedTable ->perPage = 25 ;
120- $ this ->assertSame (25 , $ this ->unpaginatedTable ->getPerPage ());
116+ $ this ->assertSame (10 , $ this ->basicTable ->getPerPage ());
117+ $ this ->basicTable ->unsetPerPage ();
118+ $ this ->basicTable ->setDefaultPerPage (50 );
119+ $ this ->assertSame (50 , $ this ->basicTable ->getDefaultPerPage ());
120+ $ this ->assertSame (50 , $ this ->basicTable ->getPerPage ());
121+ $ this ->basicTable ->perPage = 25 ;
122+ $ this ->assertSame (25 , $ this ->basicTable ->getPerPage ());
121123 }
122124}
You can’t perform that action at this time.
0 commit comments