✨ Story 4.3: page a-propos
This commit is contained in:
19
tests/about.test.php
Normal file
19
tests/about.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/about.php');
|
||||
assertTrue(strpos($content, 'Bonjour, je suis') !== false, 'missing who section');
|
||||
assertTrue(strpos($content, 'Mon Parcours') !== false, 'missing parcours section');
|
||||
assertTrue(strpos($content, 'Pourquoi le Développement Web') !== false, 'missing why section');
|
||||
assertTrue(strpos($content, 'Grand Est, France') !== false, 'missing location');
|
||||
assertTrue(strpos($content, '/assets/img/profile.webp') !== false, 'missing profile image');
|
||||
assertTrue(strpos($content, 'Me contacter') !== false, 'missing CTA');
|
||||
|
||||
fwrite(STDOUT, "OK\n");
|
||||
@@ -17,4 +17,5 @@ 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')
|
||||
php (Join-Path $here 'about.test.php')
|
||||
'OK'
|
||||
Reference in New Issue
Block a user