62 lines
1.3 KiB
PHP
62 lines
1.3 KiB
PHP
|
<?php
|
||
|
// Fichier des tests unitaires de l'exercice 3
|
||
|
include 'functions.php';
|
||
|
require 'EndUnit/EndUnit-v1.1.php';
|
||
|
use endunit\EndUnit;
|
||
|
?>
|
||
|
<!DOCTYPE html>
|
||
|
<html lang="fr">
|
||
|
<head>
|
||
|
<meta charset="utf-8">
|
||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||
|
<title>Tests Unitaires</title>
|
||
|
<style type="text/css">
|
||
|
body {
|
||
|
background-color: #3b3f42;
|
||
|
color: #c2c8cf;
|
||
|
}
|
||
|
i {
|
||
|
color: #F3C178;
|
||
|
}
|
||
|
code {
|
||
|
color: #FFFFFF;
|
||
|
}
|
||
|
b.pass {
|
||
|
color: #00A878;
|
||
|
}
|
||
|
b.fail {
|
||
|
color: #FE5E41;
|
||
|
}
|
||
|
</style>
|
||
|
</head>
|
||
|
<body>
|
||
|
<h1>Tests Unitaires | Exercice 3</h1>
|
||
|
|
||
|
<h2>fonction : getArrayFrom0To5()</h2>
|
||
|
<ul>
|
||
|
<li>
|
||
|
<h3>Test #1 avec : ()</h3>
|
||
|
<?= EndUnit::assertArrayEquals([0,1,2,3,4,5], getArrayFrom0To5()) ?>
|
||
|
</li>
|
||
|
</ul>
|
||
|
|
||
|
<h2>fonction : getArrayFrom0To5WithStringIndex()</h2>
|
||
|
<ul>
|
||
|
<li>
|
||
|
<h3>Test #1 avec : ()</h3>
|
||
|
<?= EndUnit::assertArrayEquals(
|
||
|
['zéro'=>0,'un'=>1,'deux'=>2,'trois'=>3,'quatre'=>4,'cinq'=>5],
|
||
|
getArrayFrom0To5WithStringIndex()
|
||
|
) ?>
|
||
|
</li>
|
||
|
</ul>
|
||
|
|
||
|
<h2>fonction : presentTheElement()</h2>
|
||
|
<ul>
|
||
|
<li>
|
||
|
<h3>Test #1 avec : ()</h3>
|
||
|
<?= EndUnit::assertArrayEquals([0,1,2,3,4,5], getArrayFrom0To5()) ?>
|
||
|
</li>
|
||
|
</ul>
|
||
|
</body>
|
||
|
</html>
|