Improved naming and documentation of CLIUser functions on AbstractLogEntry

This commit is contained in:
Jan Böhmer 2023-04-08 01:13:13 +02:00
parent c060d6ebb1
commit d258235430
5 changed files with 28 additions and 13 deletions

View file

@ -168,16 +168,16 @@ class AbstractLogEntryTest extends TestCase
//By default no no CLI username is set
$this->assertNull($log->getCLIUsername());
$this->assertFalse($log->isCLIUser());
$this->assertFalse($log->isCLIEntry());
$user = new User();
$user->setName('test');
$log->setUser($user);
//Set a CLI username
$log->setCLIUser('root');
$log->setCLIUsername('root');
$this->assertSame('root', $log->getCLIUsername());
$this->assertTrue($log->isCLIUser());
$this->assertTrue($log->isCLIEntry());
//Normal user must be null now
$this->assertNull($log->getUser());