Split auth help link contracts

This commit is contained in:
2026-03-19 19:05:29 +01:00
parent 522705dd33
commit 0bacf2a7a6
6 changed files with 82 additions and 59 deletions

View File

@@ -0,0 +1,29 @@
<?php
namespace MintyPHP\Tests\Architecture;
use PHPUnit\Framework\TestCase;
final class AuthHelpLinksPartialContractTest extends TestCase
{
use ProjectFileAssertionSupport;
public function testAuthHelpLinksPartialSupportsContextFlags(): void
{
$content = $this->readProjectFile('templates/partials/auth-help-links.phtml');
$this->assertStringContainsString('$authHelpContext', $content);
$this->assertStringContainsString("'show_forgot'", $content);
$this->assertStringContainsString("'show_register'", $content);
$this->assertStringContainsString("'show_back_to_login'", $content);
$this->assertStringContainsString("'show_support'", $content);
}
public function testRegisterLinkRemainsGuardedByRegistrationFlag(): void
{
$content = $this->readProjectFile('templates/partials/auth-help-links.phtml');
$this->assertStringContainsString('allowRegistration()', $content);
$this->assertStringContainsString("lurl('register')", $content);
}
}