Skip to content
Permalink
Browse files

Adjust tests.

  • Loading branch information...
dereuromark committed Nov 27, 2016
1 parent 35d6df5 commit da3dec031bf70f2b3bf01a5c72fcf9f3ca03abb8
Showing with 21 additions and 0 deletions.
  1. +9 −0 tests/TestCase/Shell/Task/LoadTaskTest.php
  2. +12 −0 tests/TestCase/Shell/Task/UnloadTaskTest.php
@@ -22,6 +22,10 @@
*/
class LoadTaskTest extends TestCase
{
/**
* @var \Cake\Shell\Task\LoadTask|\PHPUnit_Framework_MockObject_MockObject
*/
protected $Task;
/**
* setUp method
@@ -73,6 +77,7 @@ public function testLoad()
'bootstrap' => false,
'routes' => false,
'autoload' => true,
'cli' => false
];
$action = $this->Task->main('TestPlugin');
@@ -95,6 +100,7 @@ public function testLoadWithBootstrap()
'bootstrap' => true,
'routes' => false,
'autoload' => true,
'cli' => false
];
$action = $this->Task->main('TestPlugin');
@@ -117,6 +123,7 @@ public function testLoadWithRoutes()
'bootstrap' => false,
'routes' => true,
'autoload' => true,
'cli' => false
];
$action = $this->Task->main('TestPlugin');
@@ -139,6 +146,7 @@ public function testLoadNoAutoload()
'bootstrap' => false,
'routes' => true,
'autoload' => false,
'cli' => false
];
$action = $this->Task->main('TestPlugin');
@@ -161,6 +169,7 @@ public function testLoadNothing()
'bootstrap' => false,
'routes' => false,
'autoload' => false,
'cli' => false
];
$action = $this->Task->main('TestPlugin');
@@ -22,6 +22,10 @@
*/
class UnloadTaskTest extends TestCase
{
/**
* @var \Cake\Shell\Task\UnloadTask|\PHPUnit_Framework_MockObject_MockObject
*/
protected $Task;
/**
* setUp method
@@ -80,6 +84,10 @@ public function testUnload()
$expected = "Plugin::load('TestPlugin', ['autoload' => true, 'bootstrap' => false, 'routes' => false]);";
$this->assertContains($expected, $bootstrap->read());
$this->Task->params = [
'cli' => false
];
$action = $this->Task->main('TestPlugin');
$this->assertTrue($action);
@@ -98,6 +106,10 @@ public function testRegularExpressions()
{
$bootstrap = new File($this->bootstrap, false);
$this->Task->params = [
'cli' => false
];
// Plugin::load('TestPlugin', [
// 'boostrap' => false
// ]);

0 comments on commit da3dec0

Please sign in to comment.
You can’t perform that action at this time.