<h3>Equality Test (assert_equals)</h3><?php 
// Let's see how the algorithm fares if we use the ```assert_equals()``` method instead
$test1->assert_equals(square_n_sum(array(1, 2, 3, 4)), 30, "Whoops, your algorithm did not return the expected result.  Please check your algorithm for any possible logical errors.");
$test1->assert_equals(square_n_sum(array(2, 3, 4, 5)), 54);
$test1->assert_equals(square_n_sum(array(3, 4, 5, 6, 7)), 135);
$test1->assert_equals(square_n_sum(array(3, 4, 5, 5)), 75, "Sorry, your algorithm did not return the correct value(s).  Maybe you squared the sum of the numbers instead of summing the square of the numbers?");
?>
<h3>Inequality Test - Making sure the algorithm does NOT return such values</h3><?php 
// The algorithm should NOT return such values
$test1->assert_not_equals(square_n_sum(array(3, 4, 5, 5)), 0);
$test1->assert_not_equals(square_n_sum(array(3, 4, 5, 5)), 72);
$test1->assert_not_equals(square_n_sum(array(3, 4, 5, 5)), 73);
$test1->assert_not_equals(square_n_sum(array(3, 4, 5, 5)), 74);
$test1->assert_not_equals(square_n_sum(array(3, 4, 5, 5)), 76);
$test1->assert_not_equals(square_n_sum(array(3, 4, 5, 5)), 77);
$test1->assert_not_equals(square_n_sum(array(3, 4, 5, 5)), 78);
?>
<h3>Results</h3><?php 
$test1->print_summary();
?>
    <h2>Test - Faulty Algorithm</h2>
    <p>
      In the case of a faulty algorithm, the algorithm may manage to pass some (or even most) tests, but ultimately it will fail in some cases.  As long as the algorithm fails in one or more instances, the algorithm will not pass.
    </p>
    <p>
      <strong><em><u>Note: It is HIGHLY recommended that you create a <code>new</code> instance of <code>Test</code> every time you test a new function/algorithm.</u></em></strong>
    </p>
    <h3>Faulty Algorithm Code</h3>
    <p>
<pre style="color:white;background-color:black;padding:10px;border-radius:3px;word-wrap:break-word;"><code>function faulty_square_n_sum($nums) {
  $sum_the_nums = 0;
/*
  square_n_sum.php
  My first Kumite on Codewars :D
  Open Source
  @author DonaldKellett
*/
function square_n_sum($array_of_numbers)
{
    for ($i = 0; $i < sizeof($array_of_numbers); $i++) {
        $array_of_numbers[$i] = $array_of_numbers[$i] ** 2;
    }
    $sum_of_squared_numbers = 0;
    for ($i = 0; $i < sizeof($array_of_numbers); $i++) {
        $sum_of_squared_numbers += $array_of_numbers[$i];
    }
    return $sum_of_squared_numbers;
}
echo square_n_sum(array(1, 2, 3, 5, 6));
// Should return 75
echo "<br />";
echo square_n_sum(array(1, 2));
// Should return 5
echo "<br />";
echo square_n_sum(array(3, 4));
// Should return 25
echo "<br />";
echo square_n_sum(array(1, 2, 3, 4));
// Should return 30
echo "<br />";
echo square_n_sum(array(1, 2, 3, 4, 5, 6, 7, 8, 9, 99));
// Should return 10086