mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-27 20:28:54 +02:00
Improved naming and documentation of CLIUser functions on AbstractLogEntry
This commit is contained in:
parent
c060d6ebb1
commit
d258235430
5 changed files with 28 additions and 13 deletions
|
@ -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());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue