Files
Portfolio-Codex/tests/tools.test.php
2026-02-04 17:46:07 +01:00

19 lines
642 B
PHP

<?php
require_once __DIR__ . '/../includes/functions.php';
function assertTrue($cond, $msg) {
if (!$cond) {
fwrite(STDERR, $msg . PHP_EOL);
exit(1);
}
}
$content = file_get_contents(__DIR__ . '/../pages/skills.php');
assertTrue(strpos($content, 'Outils Démontrables') !== false, 'missing demonstrable section');
assertTrue(strpos($content, 'Autres Outils') !== false, 'missing other tools section');
assertTrue(strpos($content, 'target="_blank"') !== false, 'missing external link target');
$icon = getToolIcon('github');
assertTrue(strpos($icon, '<svg') !== false, 'icon svg missing');
fwrite(STDOUT, "OK\n");