2008-05-30 11:40:08 +00:00
|
|
|
<?php
|
|
|
|
/* SVN FILE: $Id$ */
|
|
|
|
/**
|
|
|
|
* Short description for file.
|
|
|
|
*
|
|
|
|
* Long description for file
|
|
|
|
*
|
|
|
|
* PHP versions 4 and 5
|
|
|
|
*
|
|
|
|
* CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite>
|
|
|
|
* Copyright 2005-2007, Cake Software Foundation, Inc.
|
|
|
|
*
|
|
|
|
* Licensed under The Open Group Test Suite License
|
|
|
|
* Redistributions of files must retain the above copyright notice.
|
|
|
|
*
|
|
|
|
* @filesource
|
2008-10-30 17:30:26 +00:00
|
|
|
* @copyright Copyright 2005-2007, Cake Software Foundation, Inc.
|
|
|
|
* @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests
|
|
|
|
* @package cake.tests
|
|
|
|
* @subpackage cake.tests.cases.console
|
|
|
|
* @since CakePHP(tm) v 1.2.0.5432
|
|
|
|
* @version $Revision$
|
|
|
|
* @modifiedby $LastChangedBy$
|
|
|
|
* @lastmodified $Date$
|
|
|
|
* @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License
|
2008-05-30 11:40:08 +00:00
|
|
|
*/
|
|
|
|
if (!defined('DISABLE_AUTO_DISPATCH')) {
|
|
|
|
define('DISABLE_AUTO_DISPATCH', true);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!class_exists('ShellDispatcher')) {
|
|
|
|
ob_start();
|
|
|
|
$argv = false;
|
|
|
|
require CAKE . 'console' . DS . 'cake.php';
|
|
|
|
ob_end_clean();
|
|
|
|
}
|
2008-06-02 19:22:55 +00:00
|
|
|
/**
|
|
|
|
* TestShellDispatcher class
|
2008-06-26 03:50:11 +00:00
|
|
|
*
|
2008-10-30 17:30:26 +00:00
|
|
|
* @package cake
|
|
|
|
* @subpackage cake.tests.cases.console
|
2008-06-02 19:22:55 +00:00
|
|
|
*/
|
2008-05-30 11:40:08 +00:00
|
|
|
class TestShellDispatcher extends ShellDispatcher {
|
2008-06-02 19:22:55 +00:00
|
|
|
/**
|
|
|
|
* params property
|
2008-06-26 03:50:11 +00:00
|
|
|
*
|
2008-06-02 19:22:55 +00:00
|
|
|
* @var array
|
|
|
|
* @access public
|
|
|
|
*/
|
2008-05-30 11:40:08 +00:00
|
|
|
var $params = array();
|
2008-06-02 19:22:55 +00:00
|
|
|
/**
|
2008-11-13 00:33:53 +00:00
|
|
|
* stdout property
|
2008-06-26 03:50:11 +00:00
|
|
|
*
|
2008-11-13 00:33:53 +00:00
|
|
|
* @var string
|
|
|
|
* @access public
|
|
|
|
*/
|
|
|
|
var $stdout = '';
|
|
|
|
/**
|
|
|
|
* stderr property
|
|
|
|
*
|
|
|
|
* @var string
|
|
|
|
* @access public
|
|
|
|
*/
|
|
|
|
var $stderr = '';
|
|
|
|
/**
|
|
|
|
* stopped property
|
|
|
|
*
|
|
|
|
* @var string
|
|
|
|
* @access public
|
|
|
|
*/
|
|
|
|
var $stopped = null;
|
|
|
|
/**
|
|
|
|
* _initEnvironment method
|
|
|
|
*
|
|
|
|
* @access protected
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
function _initEnvironment() {
|
|
|
|
//
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
* stderr method
|
|
|
|
*
|
|
|
|
* @access public
|
2008-06-02 19:22:55 +00:00
|
|
|
* @return void
|
|
|
|
*/
|
2008-11-13 00:33:53 +00:00
|
|
|
function stderr($string) {
|
|
|
|
$this->stderr .= rtrim($string, ' ');
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
* stdout method
|
|
|
|
*
|
|
|
|
* @access public
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
function stdout($string, $newline = true) {
|
|
|
|
if ($newline) {
|
|
|
|
$this->stdout .= rtrim($string, ' ') . "\n";
|
|
|
|
} else {
|
|
|
|
$this->stdout .= rtrim($string, ' ');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
* _stop method
|
|
|
|
*
|
|
|
|
* @access protected
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
function _stop($status = 0) {
|
|
|
|
$this->stopped = 'Stopped with status: ' . $status;
|
2008-05-30 11:40:08 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
* Short description for class.
|
|
|
|
*
|
2008-10-30 17:30:26 +00:00
|
|
|
* @package cake.tests
|
|
|
|
* @subpackage cake.tests.cases.libs
|
2008-05-30 11:40:08 +00:00
|
|
|
*/
|
|
|
|
class ShellDispatcherTest extends UnitTestCase {
|
2008-11-13 00:33:53 +00:00
|
|
|
/**
|
|
|
|
* setUp method
|
|
|
|
*
|
|
|
|
* @access public
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
function setUp() {
|
|
|
|
if (!isset($this->pluginPaths)) {
|
|
|
|
$this->pluginPaths = Configure::read('pluginPaths');
|
|
|
|
$this->shellPaths = Configure::read('shellPaths');
|
|
|
|
}
|
|
|
|
|
|
|
|
Configure::write('pluginPaths', array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' . DS));
|
|
|
|
Configure::write('shellPaths', array(
|
|
|
|
ROOT . DS . CONSOLE_LIBS,
|
|
|
|
TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'vendors' . DS . 'shells' . DS
|
|
|
|
));
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
* tearDown method
|
|
|
|
*
|
|
|
|
* @access public
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
function tearDown() {
|
|
|
|
Configure::write('pluginPaths', $this->pluginPaths);
|
|
|
|
Configure::write('shellPaths', $this->shellPaths);
|
|
|
|
}
|
2008-06-02 19:22:55 +00:00
|
|
|
/**
|
|
|
|
* testParseParams method
|
2008-06-26 03:50:11 +00:00
|
|
|
*
|
2008-06-02 19:22:55 +00:00
|
|
|
* @access public
|
|
|
|
* @return void
|
|
|
|
*/
|
2008-05-30 11:40:08 +00:00
|
|
|
function testParseParams() {
|
|
|
|
$Dispatcher =& new TestShellDispatcher();
|
|
|
|
|
|
|
|
$params = array(
|
|
|
|
'/cake/1.2.x.x/cake/console/cake.php',
|
|
|
|
'bake',
|
|
|
|
'-app',
|
|
|
|
'new',
|
|
|
|
'-working',
|
|
|
|
'/var/www/htdocs'
|
|
|
|
);
|
|
|
|
$expected = array(
|
|
|
|
'app' => 'new',
|
|
|
|
'webroot' => 'webroot',
|
|
|
|
'working' => '/var/www/htdocs/new',
|
|
|
|
'root' => '/var/www/htdocs'
|
|
|
|
);
|
|
|
|
$Dispatcher->parseParams($params);
|
|
|
|
$this->assertEqual($expected, $Dispatcher->params);
|
|
|
|
|
|
|
|
|
|
|
|
$params = array('cake.php');
|
|
|
|
$expected = array(
|
|
|
|
'app' => 'app',
|
|
|
|
'webroot' => 'webroot',
|
2008-11-13 00:33:53 +00:00
|
|
|
'working' => str_replace('\\', '/', CAKE_CORE_INCLUDE_PATH . DS . 'app'),
|
|
|
|
'root' => str_replace('\\', '/', CAKE_CORE_INCLUDE_PATH),
|
2008-05-30 11:40:08 +00:00
|
|
|
);
|
|
|
|
$Dispatcher->params = $Dispatcher->args = array();
|
|
|
|
$Dispatcher->parseParams($params);
|
|
|
|
$this->assertEqual($expected, $Dispatcher->params);
|
|
|
|
|
|
|
|
|
|
|
|
$params = array(
|
|
|
|
'cake.php',
|
|
|
|
'-app',
|
|
|
|
'new',
|
|
|
|
);
|
|
|
|
$expected = array(
|
|
|
|
'app' => 'new',
|
|
|
|
'webroot' => 'webroot',
|
2008-11-13 00:33:53 +00:00
|
|
|
'working' => str_replace('\\', '/', CAKE_CORE_INCLUDE_PATH . DS . 'new'),
|
|
|
|
'root' => str_replace('\\', '/', CAKE_CORE_INCLUDE_PATH)
|
2008-05-30 11:40:08 +00:00
|
|
|
);
|
|
|
|
$Dispatcher->params = $Dispatcher->args = array();
|
|
|
|
$Dispatcher->parseParams($params);
|
|
|
|
$this->assertEqual($expected, $Dispatcher->params);
|
|
|
|
|
|
|
|
|
|
|
|
$params = array(
|
|
|
|
'./cake.php',
|
|
|
|
'bake',
|
|
|
|
'-app',
|
|
|
|
'new',
|
|
|
|
'-working',
|
|
|
|
'/cake/1.2.x.x/cake/console'
|
|
|
|
);
|
|
|
|
|
|
|
|
$expected = array(
|
|
|
|
'app' => 'new',
|
|
|
|
'webroot' => 'webroot',
|
2008-11-13 00:33:53 +00:00
|
|
|
'working' => str_replace('\\', '/', CAKE_CORE_INCLUDE_PATH . DS . 'new'),
|
|
|
|
'root' => str_replace('\\', '/', CAKE_CORE_INCLUDE_PATH)
|
2008-05-30 11:40:08 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
$Dispatcher->params = $Dispatcher->args = array();
|
|
|
|
$Dispatcher->parseParams($params);
|
|
|
|
$this->assertEqual($expected, $Dispatcher->params);
|
|
|
|
|
|
|
|
|
|
|
|
$params = array(
|
|
|
|
'./console/cake.php',
|
|
|
|
'bake',
|
|
|
|
'-app',
|
|
|
|
'new',
|
|
|
|
'-working',
|
|
|
|
'/cake/1.2.x.x/cake'
|
|
|
|
);
|
|
|
|
$expected = array(
|
|
|
|
'app' => 'new',
|
|
|
|
'webroot' => 'webroot',
|
2008-11-13 00:33:53 +00:00
|
|
|
'working' => str_replace('\\', '/', CAKE_CORE_INCLUDE_PATH . DS . 'new'),
|
|
|
|
'root' => str_replace('\\', '/', CAKE_CORE_INCLUDE_PATH)
|
2008-05-30 11:40:08 +00:00
|
|
|
);
|
|
|
|
$Dispatcher->params = $Dispatcher->args = array();
|
|
|
|
$Dispatcher->parseParams($params);
|
|
|
|
$this->assertEqual($expected, $Dispatcher->params);
|
|
|
|
|
2008-11-07 10:41:52 +00:00
|
|
|
|
2008-05-30 11:40:08 +00:00
|
|
|
$params = array(
|
|
|
|
'./console/cake.php',
|
|
|
|
'bake',
|
|
|
|
'-app',
|
|
|
|
'new',
|
|
|
|
'-dry',
|
|
|
|
'-working',
|
|
|
|
'/cake/1.2.x.x/cake'
|
|
|
|
);
|
|
|
|
$expected = array(
|
|
|
|
'app' => 'new',
|
|
|
|
'webroot' => 'webroot',
|
2008-11-13 00:33:53 +00:00
|
|
|
'working' => str_replace('\\', '/', CAKE_CORE_INCLUDE_PATH . DS . 'new'),
|
|
|
|
'root' => str_replace('\\', '/', CAKE_CORE_INCLUDE_PATH),
|
2008-05-30 11:40:08 +00:00
|
|
|
'dry' => 1
|
|
|
|
);
|
|
|
|
$Dispatcher->params = $Dispatcher->args = array();
|
|
|
|
$Dispatcher->parseParams($params);
|
|
|
|
$this->assertEqual($expected, $Dispatcher->params);
|
|
|
|
|
2008-11-07 10:41:52 +00:00
|
|
|
|
2008-05-30 11:40:08 +00:00
|
|
|
$params = array(
|
|
|
|
'./console/cake.php',
|
|
|
|
'-working',
|
|
|
|
'/cake/1.2.x.x/cake',
|
|
|
|
'schema',
|
|
|
|
'run',
|
|
|
|
'create',
|
|
|
|
'-dry',
|
|
|
|
'-f',
|
|
|
|
'-name',
|
|
|
|
'DbAcl'
|
|
|
|
);
|
|
|
|
$expected = array(
|
|
|
|
'app' => 'app',
|
|
|
|
'webroot' => 'webroot',
|
2008-11-13 00:33:53 +00:00
|
|
|
'working' => str_replace('\\', '/', CAKE_CORE_INCLUDE_PATH . DS . 'app'),
|
|
|
|
'root' => str_replace('\\', '/', CAKE_CORE_INCLUDE_PATH),
|
2008-05-30 11:40:08 +00:00
|
|
|
'dry' => 1,
|
|
|
|
'f' => 1,
|
|
|
|
'name' => 'DbAcl'
|
|
|
|
);
|
|
|
|
$Dispatcher->params = $Dispatcher->args = array();
|
|
|
|
$Dispatcher->parseParams($params);
|
|
|
|
$this->assertEqual($expected, $Dispatcher->params);
|
|
|
|
|
2008-11-07 10:41:52 +00:00
|
|
|
|
2008-05-30 11:40:08 +00:00
|
|
|
$expected = array('./console/cake.php', 'schema', 'run', 'create');
|
|
|
|
$this->assertEqual($expected, $Dispatcher->args);
|
|
|
|
|
2008-11-07 10:41:52 +00:00
|
|
|
|
2008-05-30 11:40:08 +00:00
|
|
|
$params = array(
|
|
|
|
'/cake/1.2.x.x/cake/console/cake.php',
|
|
|
|
'-working',
|
|
|
|
'/cake/1.2.x.x/app',
|
|
|
|
'schema',
|
|
|
|
'run',
|
|
|
|
'create',
|
|
|
|
'-dry',
|
|
|
|
'-name',
|
|
|
|
'DbAcl'
|
|
|
|
);
|
|
|
|
$expected = array(
|
|
|
|
'app' => 'app',
|
|
|
|
'webroot' => 'webroot',
|
|
|
|
'working' => '/cake/1.2.x.x/app',
|
|
|
|
'root' => '/cake/1.2.x.x',
|
|
|
|
'dry' => 1,
|
|
|
|
'name' => 'DbAcl'
|
|
|
|
);
|
|
|
|
$Dispatcher->params = $Dispatcher->args = array();
|
|
|
|
$Dispatcher->parseParams($params);
|
|
|
|
$this->assertEqual($expected, $Dispatcher->params);
|
|
|
|
|
2008-11-07 10:41:52 +00:00
|
|
|
|
2008-05-30 11:40:08 +00:00
|
|
|
$expected = array('/cake/1.2.x.x/cake/console/cake.php', 'schema', 'run', 'create');
|
|
|
|
$this->assertEqual($expected, $Dispatcher->args);
|
|
|
|
$params = array(
|
|
|
|
'cake.php',
|
|
|
|
'-working',
|
|
|
|
'C:/wamp/www/cake/app',
|
|
|
|
'bake',
|
|
|
|
'-app',
|
|
|
|
'C:/wamp/www/apps/cake/app',
|
|
|
|
);
|
|
|
|
$expected = array(
|
|
|
|
'app' => 'app',
|
|
|
|
'webroot' => 'webroot',
|
|
|
|
'working' => 'C:\wamp\www\apps\cake\app',
|
|
|
|
'root' => 'C:\wamp\www\apps\cake'
|
|
|
|
);
|
|
|
|
|
2008-11-07 10:41:52 +00:00
|
|
|
|
2008-05-30 11:40:08 +00:00
|
|
|
$Dispatcher->params = $Dispatcher->args = array();
|
|
|
|
$Dispatcher->parseParams($params);
|
|
|
|
$this->assertEqual($expected, $Dispatcher->params);
|
|
|
|
|
2008-11-07 10:41:52 +00:00
|
|
|
|
2008-05-30 11:40:08 +00:00
|
|
|
$params = array(
|
|
|
|
'cake.php',
|
|
|
|
'-working',
|
|
|
|
'C:\wamp\www\cake\app',
|
|
|
|
'bake',
|
|
|
|
'-app',
|
|
|
|
'C:\wamp\www\apps\cake\app',
|
|
|
|
);
|
|
|
|
$expected = array(
|
|
|
|
'app' => 'app',
|
|
|
|
'webroot' => 'webroot',
|
|
|
|
'working' => 'C:\wamp\www\apps\cake\app',
|
|
|
|
'root' => 'C:\wamp\www\apps\cake'
|
|
|
|
);
|
|
|
|
$Dispatcher->params = $Dispatcher->args = array();
|
|
|
|
$Dispatcher->parseParams($params);
|
|
|
|
$this->assertEqual($expected, $Dispatcher->params);
|
2008-06-26 03:50:11 +00:00
|
|
|
|
|
|
|
|
2008-05-30 11:40:08 +00:00
|
|
|
$params = array(
|
|
|
|
'cake.php',
|
|
|
|
'-working',
|
|
|
|
'C:\wamp\www\apps',
|
|
|
|
'bake',
|
|
|
|
'-app',
|
|
|
|
'cake\app',
|
|
|
|
'-url',
|
|
|
|
'http://example.com/some/url/with/a/path'
|
|
|
|
);
|
|
|
|
$expected = array(
|
|
|
|
'app' => 'app',
|
|
|
|
'webroot' => 'webroot',
|
|
|
|
'working' => 'C:\wamp\www\apps\cake\app',
|
|
|
|
'root' => 'C:\wamp\www\apps\cake',
|
|
|
|
'url' => 'http://example.com/some/url/with/a/path'
|
|
|
|
);
|
|
|
|
$Dispatcher->params = $Dispatcher->args = array();
|
|
|
|
$Dispatcher->parseParams($params);
|
|
|
|
$this->assertEqual($expected, $Dispatcher->params);
|
|
|
|
|
2008-06-26 03:50:11 +00:00
|
|
|
|
|
|
|
$params = array(
|
|
|
|
'/home/amelo/dev/cake-common/cake/console/cake.php',
|
|
|
|
'-root',
|
|
|
|
'/home/amelo/dev/lsbu-vacancy',
|
|
|
|
'-working',
|
|
|
|
'/home/amelo/dev/lsbu-vacancy',
|
|
|
|
'-app',
|
|
|
|
'app',
|
|
|
|
);
|
|
|
|
$expected = array(
|
|
|
|
'app' => 'app',
|
|
|
|
'webroot' => 'webroot',
|
|
|
|
'working' => '/home/amelo/dev/lsbu-vacancy/app',
|
|
|
|
'root' => '/home/amelo/dev/lsbu-vacancy',
|
|
|
|
);
|
|
|
|
$Dispatcher->params = $Dispatcher->args = array();
|
|
|
|
$Dispatcher->parseParams($params);
|
|
|
|
$this->assertEqual($expected, $Dispatcher->params);
|
2008-11-13 00:33:53 +00:00
|
|
|
}
|
|
|
|
/**
|
|
|
|
* testBuildPaths method
|
|
|
|
*
|
|
|
|
* @access public
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
function testBuildPaths() {
|
|
|
|
$Dispatcher =& new TestShellDispatcher();
|
|
|
|
$this->assertEqual($Dispatcher->shellPaths, array(
|
|
|
|
TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' . DS . 'test_plugin' . DS . 'vendors' . DS . 'shells' . DS,
|
|
|
|
TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' . DS . 'test_plugin_two' . DS . 'vendors' . DS . 'shells' . DS,
|
|
|
|
APP . 'vendors' . DS . 'shells' . DS,
|
|
|
|
VENDORS . 'shells' . DS,
|
|
|
|
ROOT . DS . CONSOLE_LIBS,
|
|
|
|
TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'vendors' . DS . 'shells' . DS,
|
|
|
|
));
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
* testDispatch method
|
|
|
|
*
|
|
|
|
* @access public
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
function testDispatch() {
|
|
|
|
$Dispatcher =& new TestShellDispatcher(array('sample'));
|
|
|
|
$this->assertPattern('/This is the main method called from SampleShell/', $Dispatcher->stdout);
|
|
|
|
|
|
|
|
$Dispatcher =& new TestShellDispatcher(array('test_plugin_two.example'));
|
|
|
|
$this->assertPattern('/This is the main method called from TestPluginTwo.ExampleShell/', $Dispatcher->stdout);
|
|
|
|
|
|
|
|
$Dispatcher =& new TestShellDispatcher(array('test_plugin_two.welcome', 'say_hello'));
|
|
|
|
$this->assertPattern('/This is the say_hello method called from TestPluginTwo.WelcomeShell/', $Dispatcher->stdout);
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
* testHelpCommand method
|
|
|
|
*
|
|
|
|
* @access public
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
function testHelpCommand() {
|
|
|
|
$Dispatcher =& new TestShellDispatcher();
|
|
|
|
|
|
|
|
$expected = "/ ROOT(\\\|\/)cake(\\\|\/)tests(\\\|\/)test_app(\\\|\/)plugins(\\\|\/)test_plugin(\\\|\/)vendors(\\\|\/)shells:";
|
|
|
|
$expected .= "\n\t example";
|
|
|
|
$expected .= "\n/";
|
|
|
|
$this->assertPattern($expected, $Dispatcher->stdout);
|
|
|
|
|
2009-03-13 16:06:18 +00:00
|
|
|
// Shells need to be returned ordered
|
|
|
|
// See Configure::__list/Folder::read
|
2008-11-13 00:33:53 +00:00
|
|
|
$expected = "/ ROOT(\\\|\/)cake(\\\|\/)tests(\\\|\/)test_app(\\\|\/)plugins(\\\|\/)test_plugin_two(\\\|\/)vendors(\\\|\/)shells:";
|
|
|
|
$expected .= "\n\t example";
|
|
|
|
$expected .= "\n\t welcome";
|
|
|
|
$expected .= "\n/";
|
|
|
|
$this->assertPattern($expected, $Dispatcher->stdout);
|
|
|
|
|
|
|
|
$expected = "/ ROOT(\\\|\/)app(\\\|\/)vendors(\\\|\/)shells:";
|
|
|
|
$expected .= "\n\t - none";
|
|
|
|
$expected .= "\n/";
|
|
|
|
$this->assertPattern($expected, $Dispatcher->stdout);
|
|
|
|
|
|
|
|
$expected = "/ ROOT(\\\|\/)vendors(\\\|\/)shells:";
|
|
|
|
$expected .= "\n\t - none";
|
|
|
|
$expected .= "\n/";
|
|
|
|
$this->assertPattern($expected, $Dispatcher->stdout);
|
|
|
|
|
2009-03-13 16:06:18 +00:00
|
|
|
// Shells need to be returned ordered
|
|
|
|
// See Configure::__list/Folder::read
|
2008-11-13 00:33:53 +00:00
|
|
|
$expected = "/ ROOT(\\\|\/)cake(\\\|\/)console(\\\|\/)libs:";
|
|
|
|
$expected .= "\n\t acl";
|
|
|
|
$expected .= "\n\t api";
|
|
|
|
$expected .= "\n\t bake";
|
|
|
|
$expected .= "\n\t console";
|
|
|
|
$expected .= "\n\t i18n";
|
|
|
|
$expected .= "\n\t schema";
|
|
|
|
$expected .= "\n\t testsuite";
|
|
|
|
$expected .= "\n/";
|
|
|
|
$this->assertPattern($expected, $Dispatcher->stdout);
|
2008-06-26 03:50:11 +00:00
|
|
|
|
2008-11-13 00:33:53 +00:00
|
|
|
$expected = "/ ROOT(\\\|\/)cake(\\\|\/)tests(\\\|\/)test_app(\\\|\/)vendors(\\\|\/)shells:";
|
|
|
|
$expected .= "\n\t sample";
|
|
|
|
$expected .= "\n/";
|
|
|
|
$this->assertPattern($expected, $Dispatcher->stdout);
|
2008-05-30 11:40:08 +00:00
|
|
|
}
|
|
|
|
}
|
2008-06-26 03:50:11 +00:00
|
|
|
?>
|