Exemplo n.º 1
0
<!DOCTYPE html>
<html>
<head>
<meta charset="ISO-8859-1">
<title>Basic tests for Tournament</title>
</head>
<body>
<h1>Tournament tests</h1>

<?php 
include_once "../models/Tournament.class.php";
?>

<h2>It should create a valid Tournament object when all input is provided</h2>
<?php 
$validTest = array("hostedBy" => "Jim", "name" => "Tournament One", "startDate" => "2015-09-17", "startTime" => "11:00", "numParticipants" => "16");
$s1 = new Tournament($validTest);
echo "{$s1}";
?>

<h2>It should extract the parameters that went in</h2>
<?php 
$props = $s1->getParameters();
print_r($props);