Setup yii app in bootstrap
This commit is contained in:
parent
6350c747b6
commit
aef387bab3
4 changed files with 46 additions and 0 deletions
|
|
@ -5,6 +5,10 @@ paths:
|
|||
support: tests/_support
|
||||
envs: tests/_envs
|
||||
actor_suffix: Tester
|
||||
settings:
|
||||
bootstrap: _bootstrap.php
|
||||
memory_limit: 1024M
|
||||
colors: true
|
||||
extensions:
|
||||
enabled:
|
||||
- Codeception\Extension\RunFailed
|
||||
|
|
|
|||
|
|
@ -14,6 +14,11 @@
|
|||
"adeattwood\\helpers\\": "src"
|
||||
}
|
||||
},
|
||||
"autoload-dev": {
|
||||
"psr-4": {
|
||||
"adeattwood\\helpers\\tests\\": "tests"
|
||||
}
|
||||
},
|
||||
"require": {
|
||||
"yiisoft/yii2": "^2.0"
|
||||
},
|
||||
|
|
|
|||
15
tests/_data/ModelOne.php
Normal file
15
tests/_data/ModelOne.php
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
<?php
|
||||
|
||||
namespace adeattwood\helpers\tests\_data;
|
||||
|
||||
class ModelOne extends \yii\base\Model
|
||||
{
|
||||
public $propOne;
|
||||
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
[ [ 'propOne' ], 'string' ]
|
||||
];
|
||||
}
|
||||
}
|
||||
22
tests/unit/_bootstrap.php
Normal file
22
tests/unit/_bootstrap.php
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @category PHP
|
||||
* @package adeattwood\yii-helpers
|
||||
* @author Ade Attwood <attwood16@googlemail.com>
|
||||
* @copyright 2017 adeattwood.co.uk
|
||||
* @license BSD-2-Clause http://adeattwood.co.uk/license.html
|
||||
* @link adeattwood.co.uk
|
||||
* @since v0.1
|
||||
*/
|
||||
|
||||
require __DIR__ . "/../../vendor/autoload.php";
|
||||
require __DIR__ . "/../../vendor/yiisoft/yii2/Yii.php";
|
||||
|
||||
$config = [
|
||||
'id' => 'Yii Helpers Tests',
|
||||
'basePath' => dirname( __DIR__ )
|
||||
];
|
||||
|
||||
( new yii\web\Application( $config ) );
|
||||
|
||||
Loading…
Reference in a new issue