@@ -8,19 +8,19 @@ class PaginationTest extends FeatureTestCase
88 public function testPaginationProvidesDifferentLinksOnDifferentPages ()
99 {
1010 // Checking the version start with 8.0.
11- if (preg_match ( " /^([8|9]\.)/ " , app ()-> version () )) {
11+ if ($ this -> appVersionEightAndUp ( )) {
1212 $ page1ActiveLink = '<span class="relative inline-flex items-center px-4 py-2 -ml-px text-sm font-medium text-gray-500 bg-white border border-gray-300 cursor-default leading-5">1</span> ' ;
1313 $ page2ActiveLink = '<span class="relative inline-flex items-center px-4 py-2 -ml-px text-sm font-medium text-gray-500 bg-white border border-gray-300 cursor-default leading-5">2</span> ' ;
1414 }
1515
16- // Checking the version start with 5.6, 5.7, 5.8 or 6 .
17- if (preg_match ( " /^((5\.[6-8])|(6\.)|(7\.))/ " , app ()-> version () )) {
16+ // Checking the version start with 5.6, 5.7, 5.8, 6 or 7 .
17+ if ($ this -> appVersionFiveBetweenSeven ( )) {
1818 $ page1ActiveLink = '<li class="page-item active" aria-current="page"><span class="page-link">1</span></li> ' ;
1919 $ page2ActiveLink = '<li class="page-item active" aria-current="page"><span class="page-link">2</span></li> ' ;
2020 }
2121
2222 // Checking the version 5.4 and 5.5
23- if (preg_match ( " /^5\.[4-5]/ " , app ()-> version () )) {
23+ if ($ this -> appVersionOld ( )) {
2424 $ page1ActiveLink = '<li class="active"><span>1</span></li> ' ;
2525 $ page2ActiveLink = '<li class="active"><span>2</span></li> ' ;
2626 }
@@ -40,17 +40,17 @@ public function testPaginationProvidesDifferentLinksOnDifferentPages()
4040 public function testAdvancedPagination ()
4141 {
4242 // Checking the version start with 8.0.
43- if (preg_match ( " /^([8|9]\.)/ " , app ()-> version () )) {
43+ if ($ this -> appVersionEightAndUp ( )) {
4444 $ page1ActiveLink = '<span class="relative inline-flex items-center px-4 py-2 -ml-px text-sm font-medium text-gray-500 bg-white border border-gray-300 cursor-default leading-5">1</span> ' ;
4545 $ page2ActiveLink = '<span class="relative inline-flex items-center px-4 py-2 -ml-px text-sm font-medium text-gray-500 bg-white border border-gray-300 cursor-default leading-5">2</span> ' ;
4646 }
4747
48- if (preg_match ( " /^((5\.[6-8])|(6\.)|(7\.))/ " , app ()-> version () )) {
48+ if ($ this -> appVersionFiveBetweenSeven ( )) {
4949 $ page1ActiveLink = '<li class="page-item active" aria-current="page"><span class="page-link">1</span></li> ' ;
5050 $ page2ActiveLink = '<li class="page-item active" aria-current="page"><span class="page-link">2</span></li> ' ;
5151 }
5252
53- if (preg_match ( " /^5\.[4-5]/ " , app ()-> version () )) {
53+ if ($ this -> appVersionOld ( )) {
5454 $ page1ActiveLink = '<li class="active"><span>1</span></li> ' ;
5555 $ page2ActiveLink = '<li class="active"><span>2</span></li> ' ;
5656 }
@@ -63,17 +63,17 @@ public function testAdvancedPagination()
6363 public function testCustomPagination ()
6464 {
6565 // Checking the version start with 8.0.
66- if (preg_match ( " /^([8|9]\.)/ " , app ()-> version () )) {
66+ if ($ this -> appVersionEightAndUp ( )) {
6767 $ page1ActiveLink = '<span class="relative inline-flex items-center px-4 py-2 -ml-px text-sm font-medium text-gray-500 bg-white border border-gray-300 cursor-default leading-5">1</span> ' ;
6868 $ page2ActiveLink = '<span class="relative inline-flex items-center px-4 py-2 -ml-px text-sm font-medium text-gray-500 bg-white border border-gray-300 cursor-default leading-5">2</span> ' ;
6969 }
7070
71- if (preg_match ( " /^((5\.[6-8])|(6\.)|(7\.))/ " , app ()-> version () )) {
71+ if ($ this -> appVersionFiveBetweenSeven ( )) {
7272 $ page1ActiveLink = '<li class="page-item active" aria-current="page"><span class="page-link">1</span></li> ' ;
7373 $ page2ActiveLink = '<li class="page-item active" aria-current="page"><span class="page-link">2</span></li> ' ;
7474 }
7575
76- if (preg_match ( " /^5\.[4-5]/ " , app ()-> version () )) {
76+ if ($ this -> appVersionOld ( )) {
7777 $ page1ActiveLink = '<li class="active"><span>1</span></li> ' ;
7878 $ page2ActiveLink = '<li class="active"><span>2</span></li> ' ;
7979 }
0 commit comments