@@ -8,19 +8,19 @@ class PaginationTest extends FeatureTestCase
8
8
public function testPaginationProvidesDifferentLinksOnDifferentPages ()
9
9
{
10
10
// Checking the version start with 8.0.
11
- if (preg_match ( " /^([8|9]\.)/ " , app ()-> version () )) {
11
+ if ($ this -> appVersionEightAndUp ( )) {
12
12
$ 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> ' ;
13
13
$ 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> ' ;
14
14
}
15
15
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 ( )) {
18
18
$ page1ActiveLink = '<li class="page-item active" aria-current="page"><span class="page-link">1</span></li> ' ;
19
19
$ page2ActiveLink = '<li class="page-item active" aria-current="page"><span class="page-link">2</span></li> ' ;
20
20
}
21
21
22
22
// Checking the version 5.4 and 5.5
23
- if (preg_match ( " /^5\.[4-5]/ " , app ()-> version () )) {
23
+ if ($ this -> appVersionOld ( )) {
24
24
$ page1ActiveLink = '<li class="active"><span>1</span></li> ' ;
25
25
$ page2ActiveLink = '<li class="active"><span>2</span></li> ' ;
26
26
}
@@ -40,17 +40,17 @@ public function testPaginationProvidesDifferentLinksOnDifferentPages()
40
40
public function testAdvancedPagination ()
41
41
{
42
42
// Checking the version start with 8.0.
43
- if (preg_match ( " /^([8|9]\.)/ " , app ()-> version () )) {
43
+ if ($ this -> appVersionEightAndUp ( )) {
44
44
$ 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> ' ;
45
45
$ 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> ' ;
46
46
}
47
47
48
- if (preg_match ( " /^((5\.[6-8])|(6\.)|(7\.))/ " , app ()-> version () )) {
48
+ if ($ this -> appVersionFiveBetweenSeven ( )) {
49
49
$ page1ActiveLink = '<li class="page-item active" aria-current="page"><span class="page-link">1</span></li> ' ;
50
50
$ page2ActiveLink = '<li class="page-item active" aria-current="page"><span class="page-link">2</span></li> ' ;
51
51
}
52
52
53
- if (preg_match ( " /^5\.[4-5]/ " , app ()-> version () )) {
53
+ if ($ this -> appVersionOld ( )) {
54
54
$ page1ActiveLink = '<li class="active"><span>1</span></li> ' ;
55
55
$ page2ActiveLink = '<li class="active"><span>2</span></li> ' ;
56
56
}
@@ -63,17 +63,17 @@ public function testAdvancedPagination()
63
63
public function testCustomPagination ()
64
64
{
65
65
// Checking the version start with 8.0.
66
- if (preg_match ( " /^([8|9]\.)/ " , app ()-> version () )) {
66
+ if ($ this -> appVersionEightAndUp ( )) {
67
67
$ 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> ' ;
68
68
$ 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> ' ;
69
69
}
70
70
71
- if (preg_match ( " /^((5\.[6-8])|(6\.)|(7\.))/ " , app ()-> version () )) {
71
+ if ($ this -> appVersionFiveBetweenSeven ( )) {
72
72
$ page1ActiveLink = '<li class="page-item active" aria-current="page"><span class="page-link">1</span></li> ' ;
73
73
$ page2ActiveLink = '<li class="page-item active" aria-current="page"><span class="page-link">2</span></li> ' ;
74
74
}
75
75
76
- if (preg_match ( " /^5\.[4-5]/ " , app ()-> version () )) {
76
+ if ($ this -> appVersionOld ( )) {
77
77
$ page1ActiveLink = '<li class="active"><span>1</span></li> ' ;
78
78
$ page2ActiveLink = '<li class="active"><span>2</span></li> ' ;
79
79
}
0 commit comments