Skip to content

Commit

Permalink
Updated Codeception config
Browse files Browse the repository at this point in the history
  • Loading branch information
elimentz committed Oct 6, 2016
1 parent dc5b8b9 commit b62cb82
Show file tree
Hide file tree
Showing 38 changed files with 266 additions and 12,813 deletions.
8 changes: 4 additions & 4 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ DB_DATABASE=ixd_yourAppName
DB_USERNAME=yan_user
DB_PASSWORD=yan_pwd

MAILGUN_DOMAIN=mg.ixudra.be
MAILGUN_SECRET=key-e9c049d16b3ceb623cd40983316a9b86
MAILGUN_DOMAIN=
MAILGUN_SECRET=

MAIL_DRIVER=mailgun
MAIL_HOST=smtp.mailgun.org
MAIL_PORT=25
MAIL_USERNAME=[email protected]
MAIL_PASSWORD=be35649cd922bcb570d7314a7d3b7c23
MAIL_USERNAME=
MAIL_PASSWORD=
MAIL_ENCRYPTION=null
MAIL_SEND=true
MAIL_RECIPIENT=[email protected]
Expand Down
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,13 @@
/build/coverage


/tests/_log
/tests/_output
/tests/_support/_generated
/tests/acceptance/AcceptanceTester.php
/tests/api/ApiTester.php
/tests/cli/CliTester.php
/tests/functional/FunctionalTester.php
/tests/unit/UnitTester.php


composer.phar
Expand Down
24 changes: 22 additions & 2 deletions app/Providers/AppServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,14 @@

namespace App\Providers;

use Illuminate\Foundation\AliasLoader;
use Illuminate\Support\Facades\Validator;
use Illuminate\Support\ServiceProvider;
use Barryvdh\Debugbar\Facade as DebugBarFacade;
use Barryvdh\Debugbar\ServiceProvider as DebugBarServiceProvider;
use Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider;
use Ixudra\Generators\GeneratorsServiceProvider;
use App\Services\Validation\AppValidator;

class AppServiceProvider extends ServiceProvider
{
Expand All @@ -13,7 +20,11 @@ class AppServiceProvider extends ServiceProvider
*/
public function boot()
{
//
// Resolve validator
Validator::resolver(function($translator, $data, $rules, $messages)
{
return new AppValidator( $translator, $data, $rules, $messages );
});
}

/**
Expand All @@ -23,6 +34,15 @@ public function boot()
*/
public function register()
{
//
if( $this->app->environment('local') ) {
$this->app->register( DebugBarServiceProvider::class );
$this->app->register( IdeHelperServiceProvider::class );
$this->app->register( GeneratorsServiceProvider::class );

$this->app->booting(function() {
$loader = AliasLoader::getInstance();
$loader->alias('Debugbar', DebugBarFacade::class );
});
}
}
}
37 changes: 19 additions & 18 deletions codeception.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
actor: Guy
actor: Tester
paths:
tests: tests
log: tests/_log
log: tests/_output
data: tests/_data
helpers: tests/_helpers
helpers: tests/_support
settings:
bootstrap: _bootstrap.php
colors: true
Expand All @@ -17,24 +17,25 @@ modules:
dump: tests/_data/dump.sql
populate: true
cleanup: true
PhpBrowser:
url: http://yourAppName.dev/
REST:
depends: PhpBrowser
depends: Laravel5
url: http://yourAppName.dev/api/v1/
Laravel5:
environment_file: .env.testing
coverage:
enabled: true
whitelist:
include:
- app/Console/*
- app/Events/*
- app/Http/*
- app/Jobs/*
- app/Listeners/*
- app/Models/*
- app/Policies/*
- app/Repositories/*
- app/Presenters/*
- app/Services/*
include:
- app/Console/*
- app/Events/*
- app/Http/*
- app/Jobs/*
- app/Listeners/*
- app/Models/*
- app/Policies/*
- app/Repositories/*
- app/Presenters/*
- app/Scopes/*
- app/Services/*
exclude:
- app/Http/routes.php
- app/Http/Kernel.php
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@
],
"post-update-cmd": [
"Illuminate\\Foundation\\ComposerScripts::postUpdate",
"php artisan optimize"
"php artisan optimize",
"php artisan ide-helper:generate"
]
},

Expand Down
12 changes: 6 additions & 6 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions config/mail.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,4 +112,8 @@

'sendmail' => '/usr/sbin/sendmail -bs',

'send' => env('MAIL_SEND', false),

'recipient' => env('MAIL_RECIPIENT', ''),

];
11 changes: 3 additions & 8 deletions phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,16 @@
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false">
stopOnFailure="false"
syntaxCheck="false">
<testsuites>
<testsuite name="Application Test Suite">
<directory>./tests/</directory>
</testsuite>
</testsuites>
<filter>
<whitelist>
<directory suffix=".php">app/</directory>
</whitelist>
</filter>
<php>
<env name="APP_ENV" value="testing"/>
<env name="CACHE_DRIVER" value="array"/>
<env name="SESSION_DRIVER" value="array"/>
<env name="QUEUE_DRIVER" value="sync"/>
</php>
</phpunit>
</phpunit>
3 changes: 2 additions & 1 deletion tests/_bootstrap.php
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
<?php
// This is global bootstrap for autoloading
// This should be added to Laravel5 module itself
ini_set('xdebug.max_nesting_level', 500);
8 changes: 0 additions & 8 deletions tests/_helpers/AcceptanceHelper.php

This file was deleted.

8 changes: 0 additions & 8 deletions tests/_helpers/ApiHelper.php

This file was deleted.

8 changes: 0 additions & 8 deletions tests/_helpers/CliHelper.php

This file was deleted.

8 changes: 0 additions & 8 deletions tests/_helpers/FunctionalHelper.php

This file was deleted.

8 changes: 0 additions & 8 deletions tests/_helpers/UnitHelper.php

This file was deleted.

File renamed without changes.
Empty file added tests/_support/.gitkeep
Empty file.
26 changes: 26 additions & 0 deletions tests/_support/AcceptanceTester.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?php


/**
* Inherited Methods
* @method void wantToTest($text)
* @method void wantTo($text)
* @method void execute($callable)
* @method void expectTo($prediction)
* @method void expect($prediction)
* @method void amGoingTo($argumentation)
* @method void am($role)
* @method void lookForwardTo($achieveValue)
* @method void comment($description)
* @method \Codeception\Lib\Friend haveFriend($name, $actorClass = NULL)
*
* @SuppressWarnings(PHPMD)
*/
class AcceptanceTester extends \Codeception\Actor
{
use _generated\AcceptanceTesterActions;

/**
* Define custom actions here
*/
}
26 changes: 26 additions & 0 deletions tests/_support/ApiTester.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?php


/**
* Inherited Methods
* @method void wantToTest($text)
* @method void wantTo($text)
* @method void execute($callable)
* @method void expectTo($prediction)
* @method void expect($prediction)
* @method void amGoingTo($argumentation)
* @method void am($role)
* @method void lookForwardTo($achieveValue)
* @method void comment($description)
* @method \Codeception\Lib\Friend haveFriend($name, $actorClass = NULL)
*
* @SuppressWarnings(PHPMD)
*/
class ApiTester extends \Codeception\Actor
{
use _generated\ApiTesterActions;

/**
* Define custom actions here
*/
}
26 changes: 26 additions & 0 deletions tests/_support/CliTester.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?php


/**
* Inherited Methods
* @method void wantToTest($text)
* @method void wantTo($text)
* @method void execute($callable)
* @method void expectTo($prediction)
* @method void expect($prediction)
* @method void amGoingTo($argumentation)
* @method void am($role)
* @method void lookForwardTo($achieveValue)
* @method void comment($description)
* @method \Codeception\Lib\Friend haveFriend($name, $actorClass = NULL)
*
* @SuppressWarnings(PHPMD)
*/
class CliTester extends \Codeception\Actor
{
use _generated\CliTesterActions;

/**
* Define custom actions here
*/
}
26 changes: 26 additions & 0 deletions tests/_support/FunctionalTester.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?php


/**
* Inherited Methods
* @method void wantToTest($text)
* @method void wantTo($text)
* @method void execute($callable)
* @method void expectTo($prediction)
* @method void expect($prediction)
* @method void amGoingTo($argumentation)
* @method void am($role)
* @method void lookForwardTo($achieveValue)
* @method void comment($description)
* @method \Codeception\Lib\Friend haveFriend($name, $actorClass = NULL)
*
* @SuppressWarnings(PHPMD)
*/
class FunctionalTester extends \Codeception\Actor
{
use _generated\FunctionalTesterActions;

/**
* Define custom actions here
*/
}
9 changes: 9 additions & 0 deletions tests/_support/Helper/Acceptance.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?php
namespace Helper;
// here you can define custom actions
// all public methods declared in helper class will be available in $I

class Acceptance extends \Codeception\Module
{

}
Loading

0 comments on commit b62cb82

Please sign in to comment.