Skip to content

Commit 81e6878

Browse files
committed
Make pagination test compatible with L5.4
1 parent 23deac4 commit 81e6878

File tree

3 files changed

+16
-9
lines changed

3 files changed

+16
-9
lines changed

phpunit.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
convertWarningsToExceptions="true"
1010
printerClass="Codedungeon\PHPUnitPrettyResultPrinter\Printer"
1111
processIsolation="false"
12-
stopOnFailure="true"
12+
stopOnFailure="false"
1313
syntaxCheck="false"
1414
>
1515
<testsuites>

tests/Feature/PaginationTest.php

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,20 @@ class PaginationTest extends FeatureTestCase
77
{
88
public function testPaginationProvidesDifferentLinksOnDifferentPages()
99
{
10-
$page1ActiveLink = starts_with(app()->version(), "5.5")
11-
? '<li class="active"><span>1</span></li>'
12-
: '<li class="page-item active" aria-current="page"><span class="page-link">1</span></li>';
13-
$page2ActiveLink = starts_with(app()->version(), "5.5")
14-
? '<li class="active"><span>2</span></li>'
15-
: '<li class="page-item active" aria-current="page"><span class="page-link">2</span></li>';
10+
if (starts_with(app()->version(), "5.6")) {
11+
$page1ActiveLink = '<li class="page-item active" aria-current="page"><span class="page-link">1</span></li>';
12+
$page2ActiveLink = '<li class="page-item active" aria-current="page"><span class="page-link">2</span></li>';
13+
}
14+
15+
if (starts_with(app()->version(), "5.5")) {
16+
$page1ActiveLink = '<li class="active"><span>1</span></li>';
17+
$page2ActiveLink = '<li class="active"><span>2</span></li>';
18+
}
19+
20+
if (starts_with(app()->version(), "5.4")) {
21+
$page1ActiveLink = '<li class="active"><span>1</span></li>';
22+
$page2ActiveLink = '<li class="active"><span>2</span></li>';
23+
}
1624

1725
$book = (new Book)
1826
->take(11)

tests/Integration/CachedBuilderTest.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
*/
2121
class CachedBuilderTest extends IntegrationTestCase
2222
{
23-
23+
2424

2525
public function testCacheIsEmptyBeforeLoadingModels()
2626
{
@@ -673,7 +673,6 @@ public function testWhereDatesResults()
673673
$this->assertTrue($liveResults->diffKeys($books)->isEmpty());
674674
}
675675

676-
/** @group test */
677676
public function testHashCollision()
678677
{
679678
$key1 = sha1('genealabs:laravel-model-caching:testing::memory::genealabslaravelmodelcachingtestsfixturesbook-id_not_in_1_2');

0 commit comments

Comments
 (0)