initial commit

This commit is contained in:
Chris Sewell
2012-11-28 03:55:08 -05:00
parent 7adb399b2e
commit cf140a2e97
3247 changed files with 492437 additions and 0 deletions

29
test/bootstrap/functional.php Executable file
View File

@ -0,0 +1,29 @@
<?php
/*
* This file is part of the symfony package.
* (c) 2004-2006 Fabien Potencier <fabien.potencier@symfony-project.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
// guess current application
if (!isset($app))
{
$traces = debug_backtrace();
$caller = $traces[0];
$app = array_pop(explode(DIRECTORY_SEPARATOR, dirname($caller['file'])));
}
// define symfony constant
define('SF_ROOT_DIR', realpath(dirname(__FILE__).'/../..'));
define('SF_APP', $app);
define('SF_ENVIRONMENT', 'test');
define('SF_DEBUG', true);
// initialize symfony
require_once(SF_ROOT_DIR.DIRECTORY_SEPARATOR.'apps'.DIRECTORY_SEPARATOR.SF_APP.DIRECTORY_SEPARATOR.'config'.DIRECTORY_SEPARATOR.'config.php');
// remove all cache
sfToolkit::clearDirectory(sfConfig::get('sf_cache_dir'));

17
test/bootstrap/unit.php Executable file
View File

@ -0,0 +1,17 @@
<?php
/*
* This file is part of the symfony package.
* (c) 2004-2006 Fabien Potencier <fabien.potencier@symfony-project.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
$_test_dir = realpath(dirname(__FILE__).'/..');
define('SF_ROOT_DIR', realpath($_test_dir.'/..'));
// symfony directories
include(SF_ROOT_DIR.DIRECTORY_SEPARATOR.'config'.DIRECTORY_SEPARATOR.'config.php');
require_once($sf_symfony_lib_dir.'/vendor/lime/lime.php');

View File

@ -0,0 +1,15 @@
<?php
include(dirname(__FILE__).'/../../bootstrap/functional.php');
// create a new test browser
$browser = new sfTestBrowser();
$browser->initialize();
$browser->
get('/clientManager/index')->
isStatusCode(200)->
isRequestParameter('module', 'clientManager')->
isRequestParameter('action', 'index')->
checkResponseElement('body', '!/This is a temporary page/')
;

View File

@ -0,0 +1,15 @@
<?php
include(dirname(__FILE__).'/../../bootstrap/functional.php');
// create a new test browser
$browser = new sfTestBrowser();
$browser->initialize();
$browser->
get('/dashboard/index')->
isStatusCode(200)->
isRequestParameter('module', 'dashboard')->
isRequestParameter('action', 'index')->
checkResponseElement('body', '!/This is a temporary page/')
;

View File

@ -0,0 +1,15 @@
<?php
include(dirname(__FILE__).'/../../bootstrap/functional.php');
// create a new test browser
$browser = new sfTestBrowser();
$browser->initialize();
$browser->
get('/faq/index')->
isStatusCode(200)->
isRequestParameter('module', 'faq')->
isRequestParameter('action', 'index')->
checkResponseElement('body', '!/This is a temporary page/')
;

View File

@ -0,0 +1,15 @@
<?php
include(dirname(__FILE__).'/../../bootstrap/functional.php');
// create a new test browser
$browser = new sfTestBrowser();
$browser->initialize();
$browser->
get('/maps/index')->
isStatusCode(200)->
isRequestParameter('module', 'maps')->
isRequestParameter('action', 'index')->
checkResponseElement('body', '!/This is a temporary page/')
;

View File

@ -0,0 +1,15 @@
<?php
include(dirname(__FILE__).'/../../bootstrap/functional.php');
// create a new test browser
$browser = new sfTestBrowser();
$browser->initialize();
$browser->
get('/messages/index')->
isStatusCode(200)->
isRequestParameter('module', 'messages')->
isRequestParameter('action', 'index')->
checkResponseElement('body', '!/This is a temporary page/')
;

View File

@ -0,0 +1,15 @@
<?php
include(dirname(__FILE__).'/../../bootstrap/functional.php');
// create a new test browser
$browser = new sfTestBrowser();
$browser->initialize();
$browser->
get('/process/index')->
isStatusCode(200)->
isRequestParameter('module', 'process')->
isRequestParameter('action', 'index')->
checkResponseElement('body', '!/This is a temporary page/')
;

View File

@ -0,0 +1,15 @@
<?php
include(dirname(__FILE__).'/../../bootstrap/functional.php');
// create a new test browser
$browser = new sfTestBrowser();
$browser->initialize();
$browser->
get('/scheduler/index')->
isStatusCode(200)->
isRequestParameter('module', 'scheduler')->
isRequestParameter('action', 'index')->
checkResponseElement('body', '!/This is a temporary page/')
;

View File

@ -0,0 +1,15 @@
<?php
include(dirname(__FILE__).'/../../bootstrap/functional.php');
// create a new test browser
$browser = new sfTestBrowser();
$browser->initialize();
$browser->
get('/security/index')->
isStatusCode(200)->
isRequestParameter('module', 'security')->
isRequestParameter('action', 'index')->
checkResponseElement('body', '!/This is a temporary page/')
;

View File

@ -0,0 +1,15 @@
<?php
include(dirname(__FILE__).'/../../bootstrap/functional.php');
// create a new test browser
$browser = new sfTestBrowser();
$browser->initialize();
$browser->
get('/support/index')->
isStatusCode(200)->
isRequestParameter('module', 'support')->
isRequestParameter('action', 'index')->
checkResponseElement('body', '!/This is a temporary page/')
;

View File

@ -0,0 +1,15 @@
<?php
include(dirname(__FILE__).'/../../bootstrap/functional.php');
// create a new test browser
$browser = new sfTestBrowser();
$browser->initialize();
$browser->
get('/unproccessed/index')->
isStatusCode(200)->
isRequestParameter('module', 'unproccessed')->
isRequestParameter('action', 'index')->
checkResponseElement('body', '!/This is a temporary page/')
;

View File

@ -0,0 +1,15 @@
<?php
include(dirname(__FILE__).'/../../bootstrap/functional.php');
// create a new test browser
$browser = new sfTestBrowser();
$browser->initialize();
$browser->
get('/unprocessed/index')->
isStatusCode(200)->
isRequestParameter('module', 'unprocessed')->
isRequestParameter('action', 'index')->
checkResponseElement('body', '!/This is a temporary page/')
;

View File

@ -0,0 +1,15 @@
<?php
include(dirname(__FILE__).'/../../bootstrap/functional.php');
// create a new test browser
$browser = new sfTestBrowser();
$browser->initialize();
$browser->
get('/userManager/index')->
isStatusCode(200)->
isRequestParameter('module', 'userManager')->
isRequestParameter('action', 'index')->
checkResponseElement('body', '!/This is a temporary page/')
;

View File

@ -0,0 +1,15 @@
<?php
include(dirname(__FILE__).'/../../bootstrap/functional.php');
// create a new test browser
$browser = new sfTestBrowser();
$browser->initialize();
$browser->
get('/workOrder/index')->
isStatusCode(200)->
isRequestParameter('module', 'workOrder')->
isRequestParameter('action', 'index')->
checkResponseElement('body', '!/This is a temporary page/')
;