NOW MANAGED ON CODEBERG
Applied latest styleci changes
Dan Brown840a1ea0112d
diff --git a/app/Actions/IpFormatter.php b/app/Actions/IpFormatter.phpindex 3ca4b6e66..21616ed29 100644--- a/app/Actions/IpFormatter.php+++ b/app/Actions/IpFormatter.php@@ -25,7 +25,7 @@ class IpFormatterprotected function maskIpv4(): string{$exploded = $this->explodeAndExpandIp('.', 4);- $maskGroupCount = min( 4 - $this->precision, count($exploded));+ $maskGroupCount = min(4 - $this->precision, count($exploded));for ($i = 0; $i < $maskGroupCount; $i++) {$exploded[3 - $i] = 'x';@@ -78,4 +78,4 @@ class IpFormatterreturn new self($ip, config('app.ip_address_precision'));}-}\ No newline at end of file+}diff --git a/tests/FavouriteTest.php b/tests/FavouriteTest.phpindex 6a5c82eab..017dd889f 100644--- a/tests/FavouriteTest.php+++ b/tests/FavouriteTest.php@@ -76,7 +76,7 @@ class FavouriteTest extends TestCasepublic function test_header_contains_link_to_favourites_page_when_logged_in(){$this->setSettings(['app-public' => 'true']);- $resp = $this->get('/');+ $resp = $this->get('/');$this->withHtml($resp)->assertElementNotContains('header', 'My Favourites');$resp = $this->actingAs($this->getViewer())->get('/');$this->withHtml($resp)->assertElementContains('header a', 'My Favourites');diff --git a/tests/Permissions/EntityPermissionsTest.php b/tests/Permissions/EntityPermissionsTest.phpindex 7f8120106..94863cd5b 100644--- a/tests/Permissions/EntityPermissionsTest.php+++ b/tests/Permissions/EntityPermissionsTest.php@@ -543,7 +543,7 @@ class EntityPermissionsTest extends TestCase$this->get('/')->assertSee('You do not have permission');$this->get($bookUrl . '/create-page')->assertRedirect('/');$this->get('/')->assertSee('You do not have permission');- $resp = $this->get($bookUrl);+ $resp = $this->get($bookUrl);$this->withHtml($resp)->assertElementNotContains('.actions', 'New Page')->assertElementNotContains('.actions', 'New Chapter');diff --git a/tests/Permissions/RolesTest.php b/tests/Permissions/RolesTest.phpindex 7593b7b11..3604a3cac 100644--- a/tests/Permissions/RolesTest.php+++ b/tests/Permissions/RolesTest.php@@ -357,7 +357,7 @@ class RolesTest extends TestCase$ownShelf->getUrl() => 'Edit',]);- $resp = $this->get($otherShelf->getUrl());+ $resp = $this->get($otherShelf->getUrl());$this->withHtml($resp)->assertElementNotContains('.action-buttons', 'Edit');$this->get($otherShelf->getUrl('/edit'))->assertRedirect('/');}@@ -388,7 +388,7 @@ class RolesTest extends TestCase$ownShelf->getUrl() => 'Delete',]);- $resp = $this->get($otherShelf->getUrl());+ $resp = $this->get($otherShelf->getUrl());$this->withHtml($resp)->assertElementNotContains('.action-buttons', 'Delete');$this->get($otherShelf->getUrl('/delete'))->assertRedirect('/');@@ -437,7 +437,7 @@ class RolesTest extends TestCase$ownBook->getUrl() => 'Edit',]);- $resp = $this->get($otherBook->getUrl());+ $resp = $this->get($otherBook->getUrl());$this->withHtml($resp)->assertElementNotContains('.action-buttons', 'Edit');$this->get($otherBook->getUrl('/edit'))->assertRedirect('/');}@@ -465,7 +465,7 @@ class RolesTest extends TestCase$ownBook->getUrl() => 'Delete',]);- $resp = $this->get($otherBook->getUrl());+ $resp = $this->get($otherBook->getUrl());$this->withHtml($resp)->assertElementNotContains('.action-buttons', 'Delete');$this->get($otherBook->getUrl('/delete'))->assertRedirect('/');$this->get($ownBook->getUrl());@@ -505,7 +505,7 @@ class RolesTest extends TestCase'description' => 'chapter desc',])->assertRedirect($ownBook->getUrl('/chapter/test-chapter'));- $resp = $this->get($book->getUrl());+ $resp = $this->get($book->getUrl());$this->withHtml($resp)->assertElementNotContains('.action-buttons', 'New Chapter');$this->get($book->getUrl('/create-chapter'))->assertRedirect('/');}@@ -537,7 +537,7 @@ class RolesTest extends TestCase$ownChapter->getUrl() => 'Edit',]);- $resp = $this->get($otherChapter->getUrl());+ $resp = $this->get($otherChapter->getUrl());$this->withHtml($resp)->assertElementNotContains('.action-buttons', 'Edit');$this->get($otherChapter->getUrl('/edit'))->assertRedirect('/');}@@ -566,12 +566,12 @@ class RolesTest extends TestCase]);$bookUrl = $ownChapter->book->getUrl();- $resp = $this->get($otherChapter->getUrl());+ $resp = $this->get($otherChapter->getUrl());$this->withHtml($resp)->assertElementNotContains('.action-buttons', 'Delete');$this->get($otherChapter->getUrl('/delete'))->assertRedirect('/');$this->get($ownChapter->getUrl());$this->delete($ownChapter->getUrl())->assertRedirect($bookUrl);- $resp = $this->get($bookUrl);+ $resp = $this->get($bookUrl);$this->withHtml($resp)->assertElementNotContains('.book-content', $ownChapter->name);}@@ -589,7 +589,7 @@ class RolesTest extends TestCase$bookUrl = $otherChapter->book->getUrl();$this->get($otherChapter->getUrl());$this->delete($otherChapter->getUrl())->assertRedirect($bookUrl);- $resp = $this->get($bookUrl);+ $resp = $this->get($bookUrl);$this->withHtml($resp)->assertElementNotContains('.book-content', $otherChapter->name);}@@ -633,11 +633,11 @@ class RolesTest extends TestCase'html' => 'page desc',])->assertRedirect($ownBook->getUrl('/page/test-page'));- $resp = $this->get($book->getUrl());+ $resp = $this->get($book->getUrl());$this->withHtml($resp)->assertElementNotContains('.action-buttons', 'New Page');$this->get($book->getUrl('/create-page'))->assertRedirect('/');- $resp = $this->get($chapter->getUrl());+ $resp = $this->get($chapter->getUrl());$this->withHtml($resp)->assertElementNotContains('.action-buttons', 'New Page');$this->get($chapter->getUrl('/create-page'))->assertRedirect('/');}@@ -698,7 +698,7 @@ class RolesTest extends TestCase$ownPage->getUrl() => 'Edit',]);- $resp = $this->get($otherPage->getUrl());+ $resp = $this->get($otherPage->getUrl());$this->withHtml($resp)->assertElementNotContains('.action-buttons', 'Edit');$this->get($otherPage->getUrl() . '/edit')->assertRedirect('/');}@@ -727,12 +727,12 @@ class RolesTest extends TestCase]);$parent = $ownPage->chapter ?? $ownPage->book;- $resp = $this->get($otherPage->getUrl());+ $resp = $this->get($otherPage->getUrl());$this->withHtml($resp)->assertElementNotContains('.action-buttons', 'Delete');$this->get($otherPage->getUrl('/delete'))->assertRedirect('/');$this->get($ownPage->getUrl());$this->delete($ownPage->getUrl())->assertRedirect($parent->getUrl());- $resp = $this->get($parent->getUrl());+ $resp = $this->get($parent->getUrl());$this->withHtml($resp)->assertElementNotContains('.book-content', $ownPage->name);}diff --git a/tests/User/UserManagementTest.php b/tests/User/UserManagementTest.phpindex 3102b7bde..c09ce8cb3 100644--- a/tests/User/UserManagementTest.php+++ b/tests/User/UserManagementTest.php@@ -24,7 +24,7 @@ class UserManagementTest extends TestCase$resp = $this->asAdmin()->get('/settings/users');$this->withHtml($resp)->assertElementContains('a[href="' . url('/settings/users/create') . '"]', 'Add New User');- $resp =$this->get('/settings/users/create');+ $resp = $this->get('/settings/users/create');$this->withHtml($resp)->assertElementContains('form[action="' . url('/settings/users/create') . '"]', 'Save');$resp = $this->post('/settings/users/create', [diff --git a/tests/User/UserPreferencesTest.php b/tests/User/UserPreferencesTest.phpindex 7f305285a..4ff471a8c 100644--- a/tests/User/UserPreferencesTest.php+++ b/tests/User/UserPreferencesTest.php@@ -149,6 +149,5 @@ class UserPreferencesTest extends TestCase$this->withHtml($resp)->assertElementExists('.featured-image-container')->assertElementNotExists('.content-wrap .entity-list-item');-}}