<?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);
    }

    public function testRegisterLinkRemainsGuardedByRegistrationFlag(): void
    {
        $content = $this->readProjectFile('templates/partials/auth-help-links.phtml');

        $this->assertStringContainsString('allowRegistration()', $content);
        $this->assertStringContainsString("lurl('register')", $content);
    }
}
