Story 3.4: page projet individuelle

This commit is contained in:
2026-02-04 17:11:44 +01:00
parent 136cdf1736
commit 475a8f5457
4 changed files with 208 additions and 37 deletions

View File

@@ -0,0 +1,21 @@
<?php
require_once __DIR__ . '/../includes/functions.php';
function assertTrue($cond, $msg) {
if (!$cond) {
fwrite(STDERR, $msg . PHP_EOL);
exit(1);
}
}
$project = getProjectBySlug('ecommerce-xyz');
assertTrue(is_array($project), 'project not found');
assertTrue(getProjectBySlug('inexistant') === null, 'missing project should be null');
$content = file_get_contents(__DIR__ . '/../pages/project-single.php');
assertTrue(strpos($content, 'Contexte') !== false, 'missing contexte section');
assertTrue(strpos($content, 'Solution Technique') !== false, 'missing solution section');
assertTrue(strpos($content, 'Retour aux projets') !== false, 'missing back link');
assertTrue(strpos($content, 'badge badge-primary') !== false, 'missing technology badges');
fwrite(STDOUT, "OK\n");