File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11#! /bin/sh
22. " $( dirname " $0 " ) /_/husky.sh"
33
4- # echo "🔍 Running PHPStan..."
5- # php vendor/bin/phpstan analyse -l 5 src/ tests/ || exit 1
6- #
7- # echo "📏 Running PHPMD..."
8- # php vendor/bin/phpmd src/ text vendor/phplist/core/config/PHPMD/rules.xml || exit 1
9- #
10- # echo "🧹 Running PHPCS..."
11- # php vendor/bin/phpcs --standard=vendor/phplist/core/config/PhpCodeSniffer/ src/ tests/ || exit 1
4+ echo " 🔍 Running PHPStan..."
5+ php vendor/bin/phpstan analyse -l 5 src/ tests/ || exit 1
6+
7+ echo " 📏 Running PHPMD..."
8+ php vendor/bin/phpmd src/ text vendor/phplist/core/config/PHPMD/rules.xml || exit 1
9+
10+ echo " 🧹 Running PHPCS..."
11+ php vendor/bin/phpcs --standard=vendor/phplist/core/config/PhpCodeSniffer/ src/ tests/ || exit 1
Original file line number Diff line number Diff line change @@ -34,8 +34,6 @@ public function testLoginPageFormFieldsAreVisible(): void
3434 $ this ->assertSelectorTextContains ('label[for="password"] ' , 'Password ' );
3535 $ this ->assertSelectorExists ('button[type="submit"] ' );
3636 $ this ->assertSelectorTextContains ('button[type="submit"] ' , 'Sign In ' );
37- $ this ->assertSelectorExists ('.login-container ' );
38- $ this ->assertSelectorExists ('#vue-app ' );
3937
4038 $ this ->assertSelectorTextContains ('h4 ' , 'Sign in to your account ' );
4139 }
@@ -54,6 +52,6 @@ public function testLoginFormSubmission(): void
5452 ]);
5553
5654 $ this ->assertPageTitleContains ('Login ' );
57- $ this ->assertSelectorExists ('.alert.alert-danger ' );
55+ $ this ->assertSelectorExists ('.bg-red-50.border-red-200.text-red-600 ' );
5856 }
5957}
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ public function testHomepageReturnsSuccess(): void
4141
4242 self ::assertSame (200 , $ response ->getStatusCode ());
4343 self ::assertStringContainsString (
44- 'This page has been intentionally left empty . ' ,
44+ 'Access is restricted to authorised administrators only . ' ,
4545 $ response ->getBody ()->getContents ()
4646 );
4747 }
Original file line number Diff line number Diff line change @@ -125,7 +125,7 @@ public function testLoginWithPostRequestSuccess(): void
125125 $ response = $ this ->controller ->login ($ request );
126126
127127 $ this ->assertInstanceOf (RedirectResponse::class, $ response );
128- $ this ->assertStringContainsString ('empty_start_page ' , $ response ->getTargetUrl ());
128+ $ this ->assertStringContainsString ('mocked-route-to-home ' , $ response ->getTargetUrl ());
129129 }
130130
131131 public function testLoginWithPostRequestFailure (): void
@@ -172,7 +172,7 @@ public function testLoginWithExistingSession(): void
172172 $ response = $ this ->controller ->login ($ request );
173173
174174 $ this ->assertInstanceOf (RedirectResponse::class, $ response );
175- $ this ->assertStringContainsString ('empty_start_page ' , $ response ->getTargetUrl ());
175+ $ this ->assertStringContainsString ('/ ' , $ response ->getTargetUrl ());
176176 }
177177
178178 public function testLogout (): void
You can’t perform that action at this time.
0 commit comments