ADconsole v1.0.0
First public release. - docs: document the audit log, user offboarding, CSV export and the "require a reason for destructive actions" setting across README, docs/ and CLAUDE/AGENTS.md; note retention for panel_audit - docs: fill the publishing placeholders (repo URL, security contact, issue-template links) and add a semantic-versioning policy - move agent/contributor context into CLAUDE/ (AGENTS.md + a README); root CLAUDE.md is now a thin @-import pointer - add a favicon (shield-lock, matching the login screen) to the login page and the app layout - CHANGELOG: promote [Unreleased] to [1.0.0]; keep the earlier internal build as [0.1.0] Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UfuvfwexztdS7LDpGuKsuK
This commit is contained in:
commit
1126d96271
174 files changed
+27113
No files matched your search
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Unit;
|
||||
|
||||
use App\Services\LdapAttributeHelper;
|
||||
use Carbon\Carbon;
|
||||
use PHPUnit\Framework\Attributes\Test;
|
||||
use Tests\TestCase;
|
||||
|
||||
class LdapAttributeHelperTest extends TestCase
|
||||
{
|
||||
#[Test]
|
||||
public function it_passes_through_already_casted_date_objects(): void
|
||||
{
|
||||
// LdapRecord dla modeli AD sam rzutuje pola typu pwdLastSet na obiekty
|
||||
// daty - helper nie może ich mangować do null.
|
||||
$date = Carbon::parse('2026-09-03 11:26:45');
|
||||
|
||||
$result = LdapAttributeHelper::windowsTimestampToCarbon($date);
|
||||
|
||||
$this->assertInstanceOf(Carbon::class, $result);
|
||||
$this->assertSame('2026-09-03 11:26:45', $result->format('Y-m-d H:i:s'));
|
||||
}
|
||||
|
||||
#[Test]
|
||||
public function it_converts_raw_windows_filetime_strings(): void
|
||||
{
|
||||
// 133697178050000000 = 2024-09-02 02:30:05 UTC
|
||||
$result = LdapAttributeHelper::windowsTimestampToCarbon('133697178050000000');
|
||||
|
||||
$this->assertInstanceOf(Carbon::class, $result);
|
||||
$this->assertSame('2024-09-02', $result->format('Y-m-d'));
|
||||
}
|
||||
|
||||
#[Test]
|
||||
public function it_returns_null_for_zero_and_never_values(): void
|
||||
{
|
||||
$this->assertNull(LdapAttributeHelper::windowsTimestampToCarbon('0'));
|
||||
$this->assertNull(LdapAttributeHelper::windowsTimestampToCarbon('9223372036854775807'));
|
||||
$this->assertNull(LdapAttributeHelper::windowsTimestampToCarbon(''));
|
||||
$this->assertNull(LdapAttributeHelper::windowsTimestampToCarbon(null));
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user