Exemple #1
0
<?php

/**
 * Bootstrap index file
 *
 * @author Antonio Ramirez <*****@*****.**>
 * @link http://www.ramirezcobos.com/
 * @link http://www.2amigos.us/
 * @copyright 2013 2amigOS! Consultation Group LLC
 * @license http://www.opensource.org/licenses/bsd-license.php New BSD License
 */
require './../../common/lib/vendor/autoload.php';
Yiinitializr\Helpers\Initializer::create('./../', 'backend', array(__DIR__ . '/../../common/config/main.php', __DIR__ . '/../../common/config/env.php', __DIR__ . '/../../common/config/local.php'))->run();
Exemple #2
0
<?php

/**
 * Custom console.php config file.
 *
 * @author Antonio Ramirez <*****@*****.**>
 * @link http://www.ramirezcobos.com/
 * @link http://www.2amigos.us/
 * @copyright 2013 2amigOS! Consultation Group LLC
 * @license http://www.opensource.org/licenses/bsd-license.php New BSD License
 */
/**
 * Include required classes
 */
require_once dirname(__FILE__) . '/../Helpers/Initializer.php';
require_once dirname(__FILE__) . '/../Helpers/ArrayX.php';
/**
 * Return the configuration array appending composer callback methods
 */
return Yiinitializr\Helpers\ArrayX::merge(Yiinitializr\Helpers\Initializer::config('console', array(dirname(__FILE__) . '/../../../config/main.php', dirname(__FILE__) . '/../../../config/env.php', dirname(__FILE__) . '/../../../config/local.php')), array('params' => array('composer.callbacks' => array('post-update' => array('yiic', 'migrate'), 'post-install' => array('yiic', 'migrate')))));
Exemple #3
0
<?php

/**
 *
 * Yiic.php bootstrap file will instantiate application with test configuration
 *
 * @author Antonio Ramirez <*****@*****.**>
 * @link http://www.ramirezcobos.com/
 * @link http://www.2amigos.us/
 * @copyright 2013 2amigOS! Consultation Group LLC
 * @license http://www.opensource.org/licenses/bsd-license.php New BSD License
 */
define('TEST_APP_INSTANCE', true);
require './common/lib/vendor/autoload.php';
Yiinitializr\Helpers\Initializer::create('./console', 'console', array('./common/config/main.php', './common/config/env.php', './common/config/local-test.php'))->run();
Exemple #4
0
<?php

/**
 * Entry point for testing version of the frontend application
 */
define('TEST_APP_INSTANCE', true);
require './../../common/lib/vendor/autoload.php';
Yiinitializr\Helpers\Initializer::create('./../', 'frontend', array(__DIR__ . '/../../common/config/main.php', __DIR__ . '/../../common/config/env.php', __DIR__ . '/../../common/config/local-test.php', 'main', 'test'))->run();
Exemple #5
0
<?php

define('TEST_APP_INSTANCE', true);
// change the following paths if necessary
$yiit = dirname(__FILE__) . '/../../../common/lib/vendor/yiisoft/yii/framework/yiit.php';
require_once $yiit;
require_once dirname(__FILE__) . '/WebTestCase.php';
require './../../../common/lib/vendor/autoload.php';
\Yii::createWebApplication(Yiinitializr\Helpers\Initializer::config('frontend', array(__DIR__ . '/../../../common/config/main.php', __DIR__ . '/../../../common/config/env.php', __DIR__ . '/../../../common/config/local-test.php', 'main', 'test')));
// Migrate up for the test db
$runner = new CConsoleCommandRunner();
$consoleCommands = (require __DIR__ . '/../../../console/config/console.php');
$runner->commands = array('migrate' => array_merge($consoleCommands['commandMap']['migrate'], array('interactive' => false)));
$runner->run(array('yiic', 'migrate'));
// Any file-system dependent data preparations. For example renaming user's uploads
// folder, and creating another with testing images
/** 
 * @TODO: Start selenium server, if it is not running
 * 
 * It may be done using command like this. But we have to redirect output to another
 * stream. If we'll not do this php script running will nang
 * 
 * system('java -jar /var/www/selenium-server-standalone-2.35.0.jar');
 * 
 */
Exemple #6
0
<?php

/**
 * Custom *EXAMPLE* console.php config file.
 *
 * @author Antonio Ramirez <*****@*****.**>
 * @link http://www.ramirezcobos.com/
 * @link http://www.2amigos.us/
 * @copyright 2013 2amigOS! Consultation Group LLC
 * @license http://www.opensource.org/licenses/bsd-license.php New BSD License
 */
/**
 * Include required classes
 */
require_once dirname(__FILE__) . '/../Helpers/Initializer.php';
require_once dirname(__FILE__) . '/../Helpers/ArrayX.php';
/**
 * Return the configuration array appending composer callback methods
 */
return Yiinitializr\Helpers\ArrayX::merge(Yiinitializr\Helpers\Initializer::config('console', array('common', 'env', 'local')), array('params' => array('composer.callbacks' => array('post-update' => array('yiic', 'migrate'), 'post-install' => array('yiic', 'migrate')))));