assertNotEmpty($uses, 'plugin.php 의 자기 네임스페이스 use 문을 찾지 못했습니다'); $violations = []; foreach (explode("\n", $src) as $i => $line) { $t = trim($line); if ($t === '' || str_starts_with($t, '*') || str_starts_with($t, '/*') || str_starts_with($t, '//') || str_starts_with($t, 'use ')) { continue; } foreach ($uses as $u) { $short = ! empty($u[2]) ? $u[2] : substr($u[1], strrpos('\\'.$u[1], '\\')); if (preg_match('/(?assertSame([], $violations, "plugin.php 가 src/ 클래스를 직접 호출합니다 (설치 시 오토로드 미등록):\n".implode("\n", $violations)); } /** * 잠금 집합은 진입 파일이 소유하고 Support 클래스는 같은 값을 돌려준다. */ public function test_locked_set_is_owned_by_entry_file_and_mirrored_by_support(): void { $fromEntry = Plugin::lockedNecessaryStorage(); $this->assertSame($fromEntry, NecessaryAllowlist::locked()); $this->assertSame($fromEntry, (new Plugin)->getConfigValues()['necessary_storage_locked']); $this->assertSame(['auth_token'], $fromEntry['localStorage']); $this->assertContains('XSRF-TOKEN', $fromEntry['cookie']); $this->assertContains('gdpr_session', $fromEntry['cookie']); $this->assertContains((string) config('session.cookie'), $fromEntry['cookie']); } }