Code: Select all
define('TAX_RATE', 0.07);
define('URL', $_SERVER['DOCUMENT_ROOT']);
function caluclate_sales_tax($amount) {
round($amount * TAX_RATE, 2);
}
// Include Test Library
require_once URL.'/simpletest/unit_tester.php';
require_once URL.'/simpletest/reporter.php';
// The test
class TestingTestCase extends UnitTestCase {
public function TestingTestCase($name=''){
$this->UnitTestCase($name);
}
public function TestSalesTax(){
$this->assertEqual(7, calculate_sales_tax(100));
}
}
$test = new TestingTestCase('Testing Unit Test');
$test->run(new htmlReporter());
"Assigning the return value of new by reference is deprecated"
I read something about passing an object as reference instead of value with the different versions but I'm not quite sure where/how/why its happening.