@@ -36,19 +36,19 @@ public function testPaginationIsCached()
36
36
37
37
public function testPaginationReturnsCorrectLinks ()
38
38
{
39
- if (preg_match ( " /^([8|9]\.)/ " , app ()-> version () )) {
39
+ if ($ this -> appVersionEightAndUp ( )) {
40
40
$ 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> ' ;
41
41
$ 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> ' ;
42
42
$ page24ActiveLink = '<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">24</span> ' ;
43
43
}
44
44
45
- if (preg_match ( " /^((5\.[6-8])|(6\.)|(7\.))/ " , app ()-> version () )) {
45
+ if ($ this -> appVersionFiveBetweenSeven ( )) {
46
46
$ page1ActiveLink = '<li class="page-item active" aria-current="page"><span class="page-link">1</span></li> ' ;
47
47
$ page2ActiveLink = '<li class="page-item active" aria-current="page"><span class="page-link">2</span></li> ' ;
48
48
$ page24ActiveLink = '<li class="page-item active" aria-current="page"><span class="page-link">24</span></li> ' ;
49
49
}
50
50
51
- if (preg_match ( " /^5\.[4-5]/ " , app ()-> version () )) {
51
+ if ($ this -> appVersionOld ( )) {
52
52
$ page1ActiveLink = '<li class="active"><span>1</span></li> ' ;
53
53
$ page2ActiveLink = '<li class="active"><span>2</span></li> ' ;
54
54
$ page24ActiveLink = '<li class="active"><span>24</span></li> ' ;
@@ -71,19 +71,19 @@ public function testPaginationReturnsCorrectLinks()
71
71
72
72
public function testPaginationWithOptionsReturnsCorrectLinks ()
73
73
{
74
- if (preg_match ( " /^([8|9]\.)/ " , app ()-> version () )) {
74
+ if ($ this -> appVersionEightAndUp ( )) {
75
75
$ 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> ' ;
76
76
$ 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> ' ;
77
77
$ page24ActiveLink = '<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">24</span> ' ;
78
78
}
79
79
80
- if (preg_match ( " /^((5\.[6-8])|(6\.)|(7\.))/ " , app ()-> version () )) {
80
+ if ($ this -> appVersionFiveBetweenSeven ( )) {
81
81
$ page1ActiveLink = '<li class="page-item active" aria-current="page"><span class="page-link">1</span></li> ' ;
82
82
$ page2ActiveLink = '<li class="page-item active" aria-current="page"><span class="page-link">2</span></li> ' ;
83
83
$ page24ActiveLink = '<li class="page-item active" aria-current="page"><span class="page-link">24</span></li> ' ;
84
84
}
85
85
86
- if (preg_match ( " /^5\.[4-5]/ " , app ()-> version () )) {
86
+ if ($ this -> appVersionOld ( )) {
87
87
$ page1ActiveLink = '<li class="active"><span>1</span></li> ' ;
88
88
$ page2ActiveLink = '<li class="active"><span>2</span></li> ' ;
89
89
$ page24ActiveLink = '<li class="active"><span>24</span></li> ' ;
@@ -106,19 +106,19 @@ public function testPaginationWithOptionsReturnsCorrectLinks()
106
106
107
107
public function testPaginationWithCustomOptionsReturnsCorrectLinks ()
108
108
{
109
- if (preg_match ( " /^([8|9]\.)/ " , app ()-> version () )) {
109
+ if ($ this -> appVersionEightAndUp ( )) {
110
110
$ 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> ' ;
111
111
$ 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> ' ;
112
112
$ page24ActiveLink = '<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">24</span> ' ;
113
113
}
114
114
115
- if (preg_match ( " /^((5\.[6-8])|(6\.)|(7\.))/ " , app ()-> version () )) {
115
+ if ($ this -> appVersionFiveBetweenSeven ( )) {
116
116
$ page1ActiveLink = '<li class="page-item active" aria-current="page"><span class="page-link">1</span></li> ' ;
117
117
$ page2ActiveLink = '<li class="page-item active" aria-current="page"><span class="page-link">2</span></li> ' ;
118
118
$ page24ActiveLink = '<li class="page-item active" aria-current="page"><span class="page-link">24</span></li> ' ;
119
119
}
120
120
121
- if (preg_match ( " /^5\.[4-5]/ " , app ()-> version () )) {
121
+ if ($ this -> appVersionOld ( )) {
122
122
$ page1ActiveLink = '<li class="active"><span>1</span></li> ' ;
123
123
$ page2ActiveLink = '<li class="active"><span>2</span></li> ' ;
124
124
$ page24ActiveLink = '<li class="active"><span>24</span></li> ' ;
0 commit comments