Skip to content

Commit

Permalink
added travis ci integration
Browse files Browse the repository at this point in the history
  • Loading branch information
hasib32 committed Mar 21, 2017
1 parent 1673cdd commit cecb09e
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 2 deletions.
10 changes: 10 additions & 0 deletions .env.travis
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
APP_ENV=testing
APP_KEY=Gfl7u2OcTQjPIPDMoi4ckoS4jTpGXqlE

DB_CONNECTION=testing
DB_TEST_USERNAME=root
DB_TEST_PASSWORD=

CACHE_DRIVER=array
SESSION_DRIVER=array
QUEUE_DRIVER=sync
13 changes: 13 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
language: php

php:
- 7.1
- 5.6

before_script:
- cp .env.travis .env
- composer self-update
- composer install --no-interaction

script:
- vendor/bin/phpunit
3 changes: 2 additions & 1 deletion app/Listeners/UserEventsListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use Illuminate\Events\Dispatcher;
use App\Events\UserEvents\UserCreatedEvent;
use App\Mails\WelcomeEmail;
use Illuminate\Support\Facades\Mail;

class UserEventsListener
{
Expand All @@ -18,7 +19,7 @@ public function onUserCreatedEvent($event)
$user = $event->user;

//send welcome email to the user
\Mail::to($user)->send(new WelcomeEmail($user));
Mail::to($user)->send(new WelcomeEmail($user));
}

/**
Expand Down
1 change: 0 additions & 1 deletion bootstrap/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@

// mail configurations
$app->configure('mail');
class_alias('Illuminate\Support\Facades\Mail', 'mail');

/*
|--------------------------------------------------------------------------
Expand Down

0 comments on commit cecb09e

Please sign in to comment.