* This file is part of the DreamFactory Oasys (Open Authentication SYStem) * * DreamFactory Oasys (Open Authentication SYStem) <http://dreamfactorysoftware.github.io> * Copyright 2014 DreamFactory Software, Inc. <*****@*****.**> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ use Kisma\Core\Utility\Log; /** * bootstrap.php * Bootstrap script for Oasys PHPUnit tests */ // Composer require dirname(__DIR__) . '/vendor/autoload.php'; // Testing keys if (file_exists(__DIR__ . '/config/keys.php')) { /** @noinspection PhpIncludeInspection */ require_once __DIR__ . '/config/keys.php'; } Log::setDefaultLog(__DIR__ . '/log/oasys.tests.log');
* * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ use DreamFactory\Oasys\Oasys; use DreamFactory\Oasys\Components\GenericUser; use DreamFactory\Oasys\Enums\Flows; use DreamFactory\Oasys\Exceptions\OasysException; use DreamFactory\Oasys\Stores\FileSystem; use Kisma\Core\Utility\Convert; use Kisma\Core\Utility\Log; require_once dirname(__DIR__) . '/bootstrap.php'; Log::setDefaultLog(__DIR__ . '/../log/error.log'); $_config = null; // Choose the provider to test //$_providerId = 'facebook'; //$_providerId = 'github'; //$_providerId = 'twitter'; $_providerId = 'google_plus'; switch ($_providerId) { case 'facebook': $_config = array('flow_type' => Flows::CLIENT_SIDE, 'client_id' => FACEBOOK_CLIENT_ID, 'client_secret' => FACEBOOK_CLIENT_SECRET); break; case 'github': $_config = array('flow_type' => Flows::CLIENT_SIDE, 'client_id' => GITHUB_CLIENT_ID, 'client_secret' => GITHUB_CLIENT_SECRET); break; case 'google_plus': $_config = array('flow_type' => Flows::CLIENT_SIDE, 'client_id' => GOOGLE_CLIENT_ID, 'client_secret' => GOOGLE_CLIENT_SECRET);
/** * @param IOInterface $io * @param Composer $composer * @param string $type */ public function __construct(IOInterface $io, Composer $composer, $type = 'library') { parent::__construct($io, $composer, $type); $this->_fabricHosted = file_exists(static::FABRIC_MARKER); $_logDir = getcwd() . '/log'; @mkdir($_logDir, 0777, true); Log::setDefaultLog($_logDir . '/package.installer.log'); }
* * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ use Kisma\Core\Utility\Log; /** * bootstrap.php * Bootstrap script for PHPUnit tests */ $_basePath = dirname(__DIR__); // Composer $_autoloader = (require $_basePath . '/vendor/autoload.php'); // Load up Yii require_once $_basePath . '/vendor/dreamfactory/yii/framework/yii.php'; // Yii debug settings defined('YII_DEBUG') or define('YII_DEBUG', true); defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL', 3); $_config = (require __DIR__ . '/config/portal-sandbox.config.php'); // Testing keys if (file_exists(__DIR__ . '/config/keys.php')) { /** @noinspection PhpIncludeInspection */ require_once __DIR__ . '/config/keys.php'; } Log::setDefaultLog(__DIR__ . '/log/portal-sandbox.tests.log'); // Create the application but don't run (false at the end) $_app = DreamFactory\Yii\Utility\Pii::run(__DIR__, $_autoloader, 'DreamFactory\\Platform\\Yii\\Components\\PlatformConsoleApplication', $_config, false);