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;
}
/**

View File

@@ -119,7 +119,7 @@ class Config {
* @param string $file
* @return bool
*/
private function load($file)
protected function load($file)
{
if (isset($this->items[$file])) return true;

View File

@@ -39,14 +39,14 @@ class Container {
*
* @var array
*/
private $singletons = array();
public $singletons = array();
/**
* The registered dependencies.
*
* @var array
*/
private $resolvers = array();
protected $resolvers = array();
/**
* Create a new IoC container instance.