Skip to content

Commit 6319ea6

Browse files
authored
Merge pull request #675 from datamweb/feat-add-shield-ver
feat: add shield version for Increase improvement
2 parents 85506ae + 7611900 commit 6319ea6

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

src/Auth.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@
2525
*/
2626
class Auth
2727
{
28+
/**
29+
* The current version of CodeIgniter Shield
30+
*/
31+
public const SHIELD_VERSION = '1.0.0-beta.5';
32+
2833
protected Authentication $authenticate;
2934

3035
/**

src/Collectors/Auth.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public function __construct()
5656
*/
5757
public function getTitleDetails(): string
5858
{
59-
return get_class($this->auth->getAuthenticator());
59+
return ShieldAuth::SHIELD_VERSION . ' | ' . get_class($this->auth->getAuthenticator());
6060
}
6161

6262
/**

tests/Collectors/AuthTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
namespace Tests\Collectors;
66

7+
use CodeIgniter\Shield\Auth as ShieldAuth;
78
use CodeIgniter\Shield\Authentication\Authenticators\Session;
89
use CodeIgniter\Shield\Collectors\Auth;
910
use CodeIgniter\Shield\Entities\User;
@@ -71,6 +72,7 @@ public function testGetTitleDetails(): void
7172
{
7273
$output = $this->collector->getTitleDetails();
7374

75+
$this->assertStringContainsString(ShieldAuth::SHIELD_VERSION, $output);
7476
$this->assertStringContainsString(Session::class, $output);
7577
}
7678

0 commit comments

Comments
 (0)