Skip to content

Commit

Permalink
Update more tests to not call App::build()
Browse files Browse the repository at this point in the history
It doesn't do much anymore anyways.
  • Loading branch information
markstory committed Sep 9, 2013
1 parent 098b735 commit 272c9d1
Show file tree
Hide file tree
Showing 7 changed files with 0 additions and 61 deletions.
Expand Up @@ -96,8 +96,6 @@ public function setUp() {
*/
public function tearDown() {
unset($this->Task);
ClassRegistry::flush();
App::build();
parent::tearDown();
}

Expand Down
13 changes: 0 additions & 13 deletions lib/Cake/Test/TestCase/Console/Command/Task/ExtractTaskTest.php
Expand Up @@ -252,9 +252,6 @@ public function testExtractMultiplePaths() {
*/
public function testExtractExcludePlugins() {
Configure::write('App.namespace', 'TestApp');
App::build(array(
'Plugin' => array(CAKE . 'Test/TestApp/Plugin/')
));
$this->out = $this->getMock('Cake\Console\ConsoleOutput', array(), array(), '', false);
$this->in = $this->getMock('Cake\Console\ConsoleInput', array(), array(), '', false);
$this->Task = $this->getMock('Cake\Console\Command\Task\ExtractTask',
Expand All @@ -281,9 +278,6 @@ public function testExtractExcludePlugins() {
*/
public function testExtractPlugin() {
Configure::write('App.namespace', 'TestApp');
App::build(array(
'Plugin' => array(CAKE . 'Test/TestApp/Plugin/')
));

$this->out = $this->getMock('Cake\Console\ConsoleOutput', array(), array(), '', false);
$this->in = $this->getMock('Cake\Console\ConsoleInput', array(), array(), '', false);
Expand All @@ -310,10 +304,6 @@ public function testExtractPlugin() {
*/
public function testExtractModelValidation() {
Configure::write('App.namespace', 'TestApp');
App::build(array(
'Model' => array(CAKE . 'Test/TestApp/Model/'),
'Plugin' => array(CAKE . 'Test/TestApp/Plugin/')
), App::RESET);
Plugin::load('TestPlugin');

$this->out = $this->getMock('Cake\Console\ConsoleOutput', array(), array(), '', false);
Expand Down Expand Up @@ -361,9 +351,6 @@ public function testExtractModelValidation() {
*/
public function testExtractModelValidationInPlugin() {
Configure::write('App.namespace', 'TestApp');
App::build(array(
'Plugin' => array(CAKE . 'Test/TestApp/Plugin/')
));
Plugin::load('TestPlugin');
$this->out = $this->getMock('Cake\Console\ConsoleOutput', array(), array(), '', false);
$this->in = $this->getMock('Cake\Console\ConsoleInput', array(), array(), '', false);
Expand Down
Expand Up @@ -59,7 +59,6 @@ public function setUp() {
}
}
$this->_testPath = array_push($paths, TMP . 'tests/');
App::build(array('Plugin' => $paths));
}

/**
Expand Down
11 changes: 0 additions & 11 deletions lib/Cake/Test/TestCase/Console/Command/Task/TemplateTaskTest.php
Expand Up @@ -102,11 +102,6 @@ public function testGetThemePath() {
* @return void
*/
public function testGenerate() {
App::build(array(
'Console' => array(
CAKE . 'Test/TestApp/Console/'
)
));
$this->Task->initialize();
$this->Task->expects($this->any())->method('in')->will($this->returnValue(1));

Expand All @@ -122,12 +117,6 @@ public function testGenerate() {
* @return void
*/
public function testGenerateWithTemplateFallbacks() {
App::build(array(
'Console' => array(
CAKE . 'Test/TestApp/Console/',
CAKE_CORE_INCLUDE_PATH . DS . 'console/'
)
));
$this->Task->initialize();
$this->Task->params['theme'] = 'test';
$this->Task->set(array(
Expand Down
3 changes: 0 additions & 3 deletions lib/Cake/Test/TestCase/Console/Command/Task/TestTaskTest.php
Expand Up @@ -588,9 +588,6 @@ public function testBakeWithPlugin() {
*/
public function testInteractiveWithPlugin() {
$testApp = CAKE . 'Test/TestApp/Plugin/';
App::build(array(
'Plugin' => array($testApp)
), App::RESET);
Plugin::load('TestPlugin');

$this->Task->plugin = 'TestPlugin';
Expand Down
18 changes: 0 additions & 18 deletions lib/Cake/Test/TestCase/Console/ShellDispatcherTest.php
Expand Up @@ -113,27 +113,9 @@ class ShellDispatcherTest extends TestCase {
*/
public function setUp() {
parent::setUp();
App::build(array(
'Plugin' => array(
CAKE . 'Test/TestApp/Plugin/'
),
'Console/Command' => array(
CAKE . 'Test/TestApp/Console/Command/'
)
), App::RESET);
Plugin::load('TestPlugin');
}

/**
* tearDown method
*
* @return void
*/
public function tearDown() {
parent::tearDown();
Plugin::unload();
}

/**
* testParseParams method
*
Expand Down
13 changes: 0 additions & 13 deletions lib/Cake/Test/TestCase/Console/ShellTest.php
Expand Up @@ -166,10 +166,6 @@ public function testConstruct() {
* @return void
*/
public function testInitialize() {
App::build(array(
'Plugin' => array(CAKE . 'Test/TestApp/Plugin/'),
'Model' => array(CAKE . 'Test/TestApp/Model/')
), App::RESET);
Configure::write('App.namespace', 'TestApp');

Plugin::load('TestPlugin');
Expand All @@ -186,8 +182,6 @@ public function testInitialize() {
$this->assertTrue(isset($this->Shell->Comment));
$this->assertInstanceOf('TestApp\Model\Comment', $this->Shell->Comment);
$this->assertEquals('TestApp\Model\Comment', $this->Shell->modelClass);

App::build();
}

/**
Expand All @@ -196,10 +190,6 @@ public function testInitialize() {
* @return void
*/
public function testLoadModel() {
App::build(array(
'Plugin' => array(CAKE . 'Test' . DS . 'TestApp' . DS . 'Plugin' . DS),
'Model' => array(CAKE . 'Test' . DS . 'TestApp' . DS . 'Model' . DS)
), App::RESET);
Configure::write('App.namespace', 'TestApp');

$Shell = new MergeShell();
Expand All @@ -212,9 +202,6 @@ public function testLoadModel() {
$this->assertTrue(isset($this->Shell->TestPluginPost));
$this->assertInstanceOf('TestPlugin\Model\TestPluginPost', $this->Shell->TestPluginPost);
$this->assertEquals('TestPluginPost', $this->Shell->modelClass);

App::build();
Plugin::unload('TestPlugin');
}

/**
Expand Down

0 comments on commit 272c9d1

Please sign in to comment.