23 lines
760 B
PHP
23 lines
760 B
PHP
<?php
|
|
require_once __DIR__ . '/../includes/functions.php';
|
|
|
|
function assertTrue($cond, $msg) {
|
|
if (!$cond) {
|
|
fwrite(STDERR, $msg . PHP_EOL);
|
|
exit(1);
|
|
}
|
|
}
|
|
|
|
$counts = getProjectCountByTech();
|
|
assertTrue(is_array($counts), 'counts not array');
|
|
assertTrue(($counts['PHP'] ?? 0) >= 1, 'expected PHP count');
|
|
|
|
$projects = getProjectsByTech('PHP');
|
|
assertTrue(is_array($projects), 'projectsByTech not array');
|
|
assertTrue(count($projects) >= 1, 'expected projects by tech');
|
|
|
|
$content = file_get_contents(__DIR__ . '/../pages/skills.php');
|
|
assertTrue(strpos($content, 'Compétences') !== false, 'skills page missing title');
|
|
assertTrue(strpos($content, '/projets?tech=') !== false, 'skills page missing tech links');
|
|
|
|
fwrite(STDOUT, "OK\n"); |