added unit tests.

This commit is contained in:
Taylor Otwell
2011-09-04 23:55:28 -05:00
parent cb8e8194ce
commit 018d25c895
6 changed files with 95 additions and 6 deletions

View File

@@ -7,7 +7,7 @@ class Benchmark {
*
* @var array
*/
public static $marks = array();
protected static $marks = array();
/**
* Start a benchmark.
@@ -32,10 +32,10 @@ class Benchmark {
{
if (array_key_exists($name, static::$marks))
{
return number_format((microtime(true) - static::$marks[$name]) * 1000, 2);
return (float) number_format((microtime(true) - static::$marks[$name]) * 1000, 2);
}
return 0.0;
return (float) 0.0;
}
/**