Files
alrahma_sunday_school/tests/app/Views/FamilyCardLoaderLoopTest.php
T
root 1787144f27
Deploy to Shared Hosting / Shared hosting deploy (push) Failing after 48s
Tests / PHPUnit (push) Failing after 1m27s
fix family card issue
2026-09-12 03:16:10 -04:00

24 lines
825 B
PHP

<?php
namespace Tests\App\Views;
use CodeIgniter\Test\CIUnitTestCase;
final class FamilyCardLoaderLoopTest extends CIUnitTestCase
{
public function testFamilyLayoutsDoNotRedirectFamilyPageToItselfAfterCardFailure(): void
{
foreach (['management_layout.php', 'main_layout.php'] as $layout) {
$source = file_get_contents(APPPATH . 'Views/layout/' . $layout) ?: '';
$this->assertStringContainsString("const familyIndexPath = familyPath + '/index';", $source, $layout);
$this->assertStringContainsString(
'currentPath !== familyPath && currentPath !== familyIndexPath',
$source,
$layout
);
$this->assertStringContainsString('The family card could not be loaded.', $source, $layout);
}
}
}