Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion classes/BlueChip/Security/Modules/Log/Event.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
abstract class Event
{
/**
* @var string Static event identificator.
* @var string Static event identifier.
*/
public const ID = '';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
class AuthBadCookie extends Event
{
/**
* @var string Static event identificator.
* @var string Static event identifier.
*/
public const ID = 'auth_bad_cookie';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
class BadRequestBan extends Event
{
/**
* @var string Static event identificator.
* @var string Static event identifier.
*/
public const ID = 'bad_request_ban';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
class BlocklistHit extends Event
{
/**
* @var string Static event identificator.
* @var string Static event identifier.
*/
public const ID = 'blocklist_hit';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
class LoginFailure extends Event
{
/**
* @var string Static event identificator.
* @var string Static event identifier.
*/
public const ID = 'login_failure';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
class LoginLockout extends Event
{
/**
* @var string Static event identificator.
* @var string Static event identifier.
*/
public const ID = 'login_lockdown';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
class LoginSuccessful extends Event
{
/**
* @var string Static event identificator.
* @var string Static event identifier.
*/
public const ID = 'login_success';

Expand Down
2 changes: 1 addition & 1 deletion classes/BlueChip/Security/Modules/Log/Events/Query404.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
class Query404 extends Event
{
/**
* @var string Static event identificator.
* @var string Static event identifier.
*/
public const ID = 'query_404';

Expand Down
2 changes: 1 addition & 1 deletion tests/integration/src/Bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public static function getWordPressTestsDirectory(): string


/**
* Construct the bootstraper.
* Construct the bootstrapper.
*/
public function __construct()
{
Expand Down
8 changes: 4 additions & 4 deletions tests/unit/src/Cases/Modules/Log/EventsMonitorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public function testBadCookie(): void
{
Actions\expectDone(Log\Action::EVENT)->once()->with(\Mockery::type(Log\Events\AuthBadCookie::class));

$this->runUnaccessibleMethod($this->monitor, 'logBadCookie', ['username' => 'test-user']);
$this->runInaccessibleMethod($this->monitor, 'logBadCookie', ['username' => 'test-user']);
}


Expand All @@ -39,22 +39,22 @@ public function testFailedLogin(): void
'get_error_message' => 'Test error message.',
]);

$this->runUnaccessibleMethod($this->monitor, 'logFailedLogin', 'test-user', $wp_error);
$this->runInaccessibleMethod($this->monitor, 'logFailedLogin', 'test-user', $wp_error);
}


public function testLoginLockout(): void
{
Actions\expectDone(Log\Action::EVENT)->once()->with(\Mockery::type(Log\Events\LoginLockout::class));

$this->runUnaccessibleMethod($this->monitor, 'logLockoutEvent', '4.3.2.1', 'test-user', 600);
$this->runInaccessibleMethod($this->monitor, 'logLockoutEvent', '4.3.2.1', 'test-user', 600);
}


public function testSuccessfulLogin(): void
{
Actions\expectDone(Log\Action::EVENT)->once()->with(\Mockery::type(Log\Events\LoginSuccessful::class));

$this->runUnaccessibleMethod($this->monitor, 'logSuccessfulLogin', 'test-user');
$this->runInaccessibleMethod($this->monitor, 'logSuccessfulLogin', 'test-user');
}
}
2 changes: 1 addition & 1 deletion tests/unit/src/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ protected function tearDown(): void
/**
* Run private or protected $method from $object with given $args and pass its return value.
*/
protected function runUnaccessibleMethod(object $object, string $method, ...$args)
protected function runInaccessibleMethod(object $object, string $method, ...$args)
{
$method = (new \ReflectionClass(\get_class($object)))->getMethod($method);
$method->setAccessible(true);
Expand Down
Loading