From 58de43ef0f1f272359aee72119446db0869e8591 Mon Sep 17 00:00:00 2001 From: Mark Date: Sun, 9 Feb 2014 19:04:26 +0400 Subject: [PATCH] added yii console command to tests --- tests/_console_bootstrap.php | 12 ++++++++++++ tests/acceptance/_console.php | 13 +++++++++++++ tests/acceptance/yii | 17 +++++++++++++++++ tests/acceptance/yii.bat | 20 ++++++++++++++++++++ tests/functional/_console.php | 13 +++++++++++++ tests/functional/yii | 17 +++++++++++++++++ tests/functional/yii.bat | 20 ++++++++++++++++++++ tests/unit/_console.php | 13 +++++++++++++ tests/unit/yii | 17 +++++++++++++++++ tests/unit/yii.bat | 20 ++++++++++++++++++++ 10 files changed, 162 insertions(+) create mode 100644 tests/_console_bootstrap.php create mode 100644 tests/acceptance/_console.php create mode 100644 tests/acceptance/yii create mode 100644 tests/acceptance/yii.bat create mode 100644 tests/functional/_console.php create mode 100644 tests/functional/yii create mode 100644 tests/functional/yii.bat create mode 100644 tests/unit/_console.php create mode 100644 tests/unit/yii create mode 100644 tests/unit/yii.bat diff --git a/tests/_console_bootstrap.php b/tests/_console_bootstrap.php new file mode 100644 index 0000000..81287f3 --- /dev/null +++ b/tests/_console_bootstrap.php @@ -0,0 +1,12 @@ + [ + 'db' => [ + 'dsn' => 'mysql:host=localhost;dbname=yii2_basic_acceptance', + ], + ], + ] +); \ No newline at end of file diff --git a/tests/acceptance/yii b/tests/acceptance/yii new file mode 100644 index 0000000..e587ba4 --- /dev/null +++ b/tests/acceptance/yii @@ -0,0 +1,17 @@ +#!/usr/bin/env php +run(); +exit($exitCode); diff --git a/tests/acceptance/yii.bat b/tests/acceptance/yii.bat new file mode 100644 index 0000000..5e21e2e --- /dev/null +++ b/tests/acceptance/yii.bat @@ -0,0 +1,20 @@ +@echo off + +rem ------------------------------------------------------------- +rem Yii command line bootstrap script for Windows. +rem +rem @author Qiang Xue +rem @link http://www.yiiframework.com/ +rem @copyright Copyright © 2012 Yii Software LLC +rem @license http://www.yiiframework.com/license/ +rem ------------------------------------------------------------- + +@setlocal + +set YII_PATH=%~dp0 + +if "%PHP_COMMAND%" == "" set PHP_COMMAND=php.exe + +"%PHP_COMMAND%" "%YII_PATH%yii" %* + +@endlocal diff --git a/tests/functional/_console.php b/tests/functional/_console.php new file mode 100644 index 0000000..7137b4c --- /dev/null +++ b/tests/functional/_console.php @@ -0,0 +1,13 @@ + [ + 'db' => [ + 'dsn' => 'mysql:host=localhost;dbname=yii2_basic_functional', + ], + ], + ] +); \ No newline at end of file diff --git a/tests/functional/yii b/tests/functional/yii new file mode 100644 index 0000000..e587ba4 --- /dev/null +++ b/tests/functional/yii @@ -0,0 +1,17 @@ +#!/usr/bin/env php +run(); +exit($exitCode); diff --git a/tests/functional/yii.bat b/tests/functional/yii.bat new file mode 100644 index 0000000..5e21e2e --- /dev/null +++ b/tests/functional/yii.bat @@ -0,0 +1,20 @@ +@echo off + +rem ------------------------------------------------------------- +rem Yii command line bootstrap script for Windows. +rem +rem @author Qiang Xue +rem @link http://www.yiiframework.com/ +rem @copyright Copyright © 2012 Yii Software LLC +rem @license http://www.yiiframework.com/license/ +rem ------------------------------------------------------------- + +@setlocal + +set YII_PATH=%~dp0 + +if "%PHP_COMMAND%" == "" set PHP_COMMAND=php.exe + +"%PHP_COMMAND%" "%YII_PATH%yii" %* + +@endlocal diff --git a/tests/unit/_console.php b/tests/unit/_console.php new file mode 100644 index 0000000..78fc118 --- /dev/null +++ b/tests/unit/_console.php @@ -0,0 +1,13 @@ + [ + 'db' => [ + 'dsn' => 'mysql:host=localhost;dbname=yii2_basic_unit', + ], + ], + ] +); \ No newline at end of file diff --git a/tests/unit/yii b/tests/unit/yii new file mode 100644 index 0000000..e587ba4 --- /dev/null +++ b/tests/unit/yii @@ -0,0 +1,17 @@ +#!/usr/bin/env php +run(); +exit($exitCode); diff --git a/tests/unit/yii.bat b/tests/unit/yii.bat new file mode 100644 index 0000000..5e21e2e --- /dev/null +++ b/tests/unit/yii.bat @@ -0,0 +1,20 @@ +@echo off + +rem ------------------------------------------------------------- +rem Yii command line bootstrap script for Windows. +rem +rem @author Qiang Xue +rem @link http://www.yiiframework.com/ +rem @copyright Copyright © 2012 Yii Software LLC +rem @license http://www.yiiframework.com/license/ +rem ------------------------------------------------------------- + +@setlocal + +set YII_PATH=%~dp0 + +if "%PHP_COMMAND%" == "" set PHP_COMMAND=php.exe + +"%PHP_COMMAND%" "%YII_PATH%yii" %* + +@endlocal