public function testAgePatient()
 {
     $array = ['H' => ['25-' => 31, '25-50' => 2, '50+' => 16], 'F' => ['25-' => 36, '25-50' => 6, '50+' => 9], 'NbrH' => 49, 'NbrF' => 51];
     $this->assertEquals(StatsRepo::getAgePatient(), $array);
 }
Example #2
0
					<a href='Patients.php'      id='patient'>Gestion des patients</a>
				</div>
			</nav>



			<!-- CONTAINER DE LA PAGE -->
			<section id='CONTAINER'>

				<!-- FIL D'ARIANE -->
				<div id='BREADCRUMB'><a href='Dashboard.php'>Accueil</a></div>

				<article data-title="Statistiques sur l'âge des patients">

					<?php 
$stats = StatsRepo::getAgePatient();
?>
					<div class="StatContainer">
						<p class="title">Homme</p>
						<div class="man bar" style="height: 150px"></div>
						<?php 
foreach ($stats['H'] as $Homme) {
    echo '<div class="man bar" style="height:' . round($Homme / $stats['NbrH'] * 150) . 'px;margin-top:' . round(150 - $Homme / $stats['NbrH'] * 150) . 'px"></div>';
}
?>

						<div class="clear labels">
							<p class="label">Total</p>
							<?php 
foreach (array_keys($stats['H']) as $key) {
    echo '<p class="label">' . $key . '</p>';