Skip to content

Commit

Permalink
Update test case Configure folder
Browse files Browse the repository at this point in the history
  • Loading branch information
jrbasso committed May 25, 2012
1 parent 517a670 commit a24b036
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 11 deletions.
8 changes: 5 additions & 3 deletions lib/Cake/Test/TestCase/Configure/IniReaderTest.php
Expand Up @@ -16,9 +16,11 @@
* @since CakePHP(tm) v 2.0
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
App::uses('IniReader', 'Configure');
namespace Cake\Test\TestCase\Configure;
use Cake\TestSuite\TestCase,
Cake\Configure\IniReader;

class IniReaderTest extends CakeTestCase {
class IniReaderTest extends TestCase {

/**
* Test data to serialize and unserialize.
Expand Down Expand Up @@ -47,7 +49,7 @@ class IniReaderTest extends CakeTestCase {
*/
public function setUp() {
parent::setUp();
$this->path = CAKE . 'Test' . DS . 'test_app' . DS . 'Config' . DS;
$this->path = CAKE . 'Test' . DS . 'TestApp' . DS . 'Config'. DS;
}

/**
Expand Down
20 changes: 12 additions & 8 deletions lib/Cake/Test/TestCase/Configure/PhpReaderTest.php
Expand Up @@ -16,9 +16,13 @@
* @since CakePHP(tm) v 2.0
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
App::uses('PhpReader', 'Configure');
namespace Cake\Test\TestCase\Configure;
use Cake\TestSuite\TestCase,
Cake\Core\App,
Cake\Core\Plugin,
Cake\Configure\PhpReader;

class PhpReaderTest extends CakeTestCase {
class PhpReaderTest extends TestCase {

/**
* Test data to serialize and unserialize.
Expand Down Expand Up @@ -47,7 +51,7 @@ class PhpReaderTest extends CakeTestCase {
*/
public function setUp() {
parent::setUp();
$this->path = CAKE . 'Test' . DS . 'test_app' . DS . 'Config' . DS;
$this->path = CAKE . 'Test' . DS . 'TestApp' . DS . 'Config'. DS;
}

/**
Expand All @@ -68,7 +72,7 @@ public function testRead() {
/**
* Test an exception is thrown by reading files that don't exist.
*
* @expectedException ConfigureException
* @expectedException Cake\Error\ConfigureException
* @return void
*/
public function testReadWithNonExistantFile() {
Expand All @@ -90,7 +94,7 @@ public function testReadEmptyFile() {
/**
* test reading keys with ../ doesn't work
*
* @expectedException ConfigureException
* @expectedException Cake\Error\ConfigureException
* @return void
*/
public function testReadWithDots() {
Expand All @@ -105,16 +109,16 @@ public function testReadWithDots() {
*/
public function testReadPluginValue() {
App::build(array(
'Plugin' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
'Plugin' => array(CAKE . 'Test' . DS . 'TestApp' . DS . 'Plugin' . DS)
), App::RESET);
CakePlugin::load('TestPlugin');
Plugin::load('TestPlugin');
$reader = new PhpReader($this->path);
$result = $reader->read('TestPlugin.load');
$this->assertTrue(isset($result['plugin_load']));

$result = $reader->read('TestPlugin.load.php');
$this->assertTrue(isset($result['plugin_load']));
CakePlugin::unload();
Plugin::unload();
}

/**
Expand Down

0 comments on commit a24b036

Please sign in to comment.