✨ Story 4.2: competences outils
This commit is contained in:
@@ -16,4 +16,5 @@ php (Join-Path $here 'project-single.test.php')
|
||||
php (Join-Path $here 'projects-secondary.test.php')
|
||||
php (Join-Path $here 'images.test.php')
|
||||
php (Join-Path $here 'skills.test.php')
|
||||
php (Join-Path $here 'tools.test.php')
|
||||
'OK'
|
||||
19
tests/tools.test.php
Normal file
19
tests/tools.test.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?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");
|
||||
Reference in New Issue
Block a user