more refactoring and dependency injection.

This commit is contained in:
Taylor Otwell
2011-09-06 22:04:52 -05:00
parent 0c2834fed1
commit 7eef380d8a
39 changed files with 560 additions and 501 deletions

View File

@@ -12,7 +12,6 @@ class ArrTest extends PHPUnit_Framework_TestCase {
$this->assertEquals(Arr::get($array, 'names.uncle'), $array['names']['uncle']);
}
/**
* @dataProvider getArray
*/
@@ -23,7 +22,6 @@ class ArrTest extends PHPUnit_Framework_TestCase {
$this->assertEquals(Arr::get($array, 'names.aunt', function() {return 'Tammy';}), 'Tammy');
}
/**
* @dataProvider getArray
*/
@@ -39,7 +37,6 @@ class ArrTest extends PHPUnit_Framework_TestCase {
}
public function getArray()
{
return array(array(

View File

@@ -2,13 +2,11 @@
class ConfigTest extends PHPUnit_Framework_TestCase {
public function setUp()
{
IoC::container()->singletons = array();
}
/**
* @dataProvider getGetMocker
*/
@@ -19,7 +17,6 @@ class ConfigTest extends PHPUnit_Framework_TestCase {
$this->assertTrue($mock->has('something'));
}
/**
* @dataProvider getGetMocker
*/
@@ -30,7 +27,6 @@ class ConfigTest extends PHPUnit_Framework_TestCase {
$this->assertFalse($mock->has('something'));
}
public function getGetMocker()
{
$mock = $this->getMock('Laravel\\Config', array('get'), array(null));
@@ -38,7 +34,6 @@ class ConfigTest extends PHPUnit_Framework_TestCase {
return array(array($mock, $mock->expects($this->any())->method('get')));
}
public function testConfigClassCanRetrieveItems()
{
$config = IoC::container()->config;
@@ -47,7 +42,6 @@ class ConfigTest extends PHPUnit_Framework_TestCase {
$this->assertEquals($config->get('application.url'), 'http://localhost');
}
public function testGetMethodReturnsDefaultWhenItemDoesntExist()
{
$config = IoC::container()->config;
@@ -57,7 +51,6 @@ class ConfigTest extends PHPUnit_Framework_TestCase {
$this->assertEquals($config->get('config.item', function() {return 'test';}), 'test');
}
public function testConfigClassCanSetItems()
{
$config = IoC::container()->config;

View File

@@ -1,12 +1,4 @@
<?php
/**
* Laravel - A clean and classy framework for PHP web development.
*
* @package Laravel
* @version 2.0.0
* @author Taylor Otwell <taylorotwell@gmail.com>
* @link http://laravel.com
*/
/*
|--------------------------------------------------------------------------