Add some event listeners and experiment with browser testing
This commit is contained in:
@@ -0,0 +1,34 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Created by IntelliJ IDEA.
|
||||||
|
* User: nabeelshahzad
|
||||||
|
* Date: 12/22/17
|
||||||
|
* Time: 11:44 AM
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace App\Listeners;
|
||||||
|
|
||||||
|
use Log;
|
||||||
|
use \App\Events\UserRegistered;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handle sending emails on different events
|
||||||
|
* @package App\Listeners
|
||||||
|
*/
|
||||||
|
class EmailEventListener
|
||||||
|
{
|
||||||
|
public function subscribe($events)
|
||||||
|
{
|
||||||
|
$events->listen(
|
||||||
|
UserRegistered::class,
|
||||||
|
'App\Listeners\EmailEventListener@onUserRegister'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function onUserRegister(UserRegistered $event)
|
||||||
|
{
|
||||||
|
Log::info($event->user->toArray());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
namespace App\Providers;
|
namespace App\Providers;
|
||||||
|
|
||||||
use Illuminate\Support\Facades\Event;
|
|
||||||
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
|
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
|
||||||
|
|
||||||
|
|
||||||
class EventServiceProvider extends ServiceProvider
|
class EventServiceProvider extends ServiceProvider
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
@@ -18,6 +18,10 @@ class EventServiceProvider extends ServiceProvider
|
|||||||
],*/
|
],*/
|
||||||
];
|
];
|
||||||
|
|
||||||
|
protected $subscribe = [
|
||||||
|
'App\Listeners\EmailEventListener',
|
||||||
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Register any events for your application.
|
* Register any events for your application.
|
||||||
*
|
*
|
||||||
@@ -26,7 +30,5 @@ class EventServiceProvider extends ServiceProvider
|
|||||||
public function boot()
|
public function boot()
|
||||||
{
|
{
|
||||||
parent::boot();
|
parent::boot();
|
||||||
|
|
||||||
//
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -49,7 +49,6 @@ class UserService extends BaseService
|
|||||||
# Let's check their rank
|
# Let's check their rank
|
||||||
$this->calculatePilotRank($user);
|
$this->calculatePilotRank($user);
|
||||||
|
|
||||||
# TODO: Send out an email
|
|
||||||
event(new UserRegistered($user));
|
event(new UserRegistered($user));
|
||||||
|
|
||||||
return $user;
|
return $user;
|
||||||
|
|||||||
+4
-2
@@ -56,7 +56,8 @@
|
|||||||
"mockery/mockery": "0.9.*",
|
"mockery/mockery": "0.9.*",
|
||||||
"filp/whoops": "~2.0",
|
"filp/whoops": "~2.0",
|
||||||
"orchestra/testbench": "v3.5.2",
|
"orchestra/testbench": "v3.5.2",
|
||||||
"bpocallaghan/generators": "5.0.1"
|
"bpocallaghan/generators": "5.0.1",
|
||||||
|
"laravel/dusk": "^2.0"
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"classmap": [
|
"classmap": [
|
||||||
@@ -67,7 +68,8 @@
|
|||||||
],
|
],
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"App\\": "app/",
|
"App\\": "app/",
|
||||||
"Modules\\": "modules/"
|
"Modules\\": "modules/",
|
||||||
|
"Tests\\": "tests/"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"autoload-dev": {
|
"autoload-dev": {
|
||||||
|
|||||||
Generated
+175
-59
@@ -4,7 +4,7 @@
|
|||||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"content-hash": "00894dc47f33576663d8967f821685e3",
|
"content-hash": "99850757675507f6225a5bbbe35734aa",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "composer/semver",
|
"name": "composer/semver",
|
||||||
@@ -427,7 +427,7 @@
|
|||||||
"Doctrine\\DBAL\\": "lib/"
|
"Doctrine\\DBAL\\": "lib/"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
"notification-url": "http://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
"MIT"
|
"MIT"
|
||||||
],
|
],
|
||||||
@@ -750,7 +750,7 @@
|
|||||||
"Egulias\\EmailValidator\\": "EmailValidator"
|
"Egulias\\EmailValidator\\": "EmailValidator"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
"notification-url": "http://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
"MIT"
|
"MIT"
|
||||||
],
|
],
|
||||||
@@ -796,7 +796,7 @@
|
|||||||
"Parsedown": ""
|
"Parsedown": ""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
"notification-url": "http://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
"MIT"
|
"MIT"
|
||||||
],
|
],
|
||||||
@@ -856,7 +856,7 @@
|
|||||||
"GuzzleHttp\\": "src/"
|
"GuzzleHttp\\": "src/"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
"notification-url": "http://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
"MIT"
|
"MIT"
|
||||||
],
|
],
|
||||||
@@ -914,7 +914,7 @@
|
|||||||
"src/functions_include.php"
|
"src/functions_include.php"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
"notification-url": "http://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
"MIT"
|
"MIT"
|
||||||
],
|
],
|
||||||
@@ -969,7 +969,7 @@
|
|||||||
"src/functions_include.php"
|
"src/functions_include.php"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
"notification-url": "http://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
"MIT"
|
"MIT"
|
||||||
],
|
],
|
||||||
@@ -1031,7 +1031,7 @@
|
|||||||
"Hashids\\": "src/"
|
"Hashids\\": "src/"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
"notification-url": "http://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
"MIT"
|
"MIT"
|
||||||
],
|
],
|
||||||
@@ -1138,7 +1138,7 @@
|
|||||||
"InfyOm\\AdminLTETemplates\\": "src/"
|
"InfyOm\\AdminLTETemplates\\": "src/"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
"notification-url": "http://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
"MIT"
|
"MIT"
|
||||||
],
|
],
|
||||||
@@ -1157,7 +1157,7 @@
|
|||||||
"laravel",
|
"laravel",
|
||||||
"templates"
|
"templates"
|
||||||
],
|
],
|
||||||
"time": "2017-11-25T04:43:54+00:00"
|
"time": "2017-11-25 04:43:54"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "infyomlabs/laravel-generator",
|
"name": "infyomlabs/laravel-generator",
|
||||||
@@ -1199,7 +1199,7 @@
|
|||||||
"src/helpers.php"
|
"src/helpers.php"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
"notification-url": "http://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
"MIT"
|
"MIT"
|
||||||
],
|
],
|
||||||
@@ -1223,7 +1223,7 @@
|
|||||||
"test",
|
"test",
|
||||||
"view"
|
"view"
|
||||||
],
|
],
|
||||||
"time": "2017-11-25T05:18:22+00:00"
|
"time": "2017-11-25 05:18:22"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "jackiedo/timezonelist",
|
"name": "jackiedo/timezonelist",
|
||||||
@@ -1249,7 +1249,7 @@
|
|||||||
"Jackiedo\\Timezonelist\\": "src/Jackiedo/Timezonelist"
|
"Jackiedo\\Timezonelist\\": "src/Jackiedo/Timezonelist"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
"notification-url": "http://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
"MIT"
|
"MIT"
|
||||||
],
|
],
|
||||||
@@ -1360,7 +1360,7 @@
|
|||||||
"stubs/"
|
"stubs/"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
"notification-url": "http://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
"MIT"
|
"MIT"
|
||||||
],
|
],
|
||||||
@@ -1406,7 +1406,7 @@
|
|||||||
"Traitor\\": "src/"
|
"Traitor\\": "src/"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
"notification-url": "http://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
"MIT"
|
"MIT"
|
||||||
],
|
],
|
||||||
@@ -1594,7 +1594,7 @@
|
|||||||
"Illuminate\\": "src/Illuminate/"
|
"Illuminate\\": "src/Illuminate/"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
"notification-url": "http://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
"MIT"
|
"MIT"
|
||||||
],
|
],
|
||||||
@@ -2017,7 +2017,7 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"description": "Bloom filter implementation",
|
"description": "Bloom filter implementation",
|
||||||
"time": "2017-11-30T17:51:14+00:00"
|
"time": "2017-11-30 17:51:14"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "monolog/monolog",
|
"name": "monolog/monolog",
|
||||||
@@ -2123,7 +2123,7 @@
|
|||||||
"Cron\\": "src/Cron/"
|
"Cron\\": "src/Cron/"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
"notification-url": "http://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
"MIT"
|
"MIT"
|
||||||
],
|
],
|
||||||
@@ -2172,7 +2172,7 @@
|
|||||||
"src/DeepCopy/deep_copy.php"
|
"src/DeepCopy/deep_copy.php"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
"notification-url": "http://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
"MIT"
|
"MIT"
|
||||||
],
|
],
|
||||||
@@ -2217,11 +2217,11 @@
|
|||||||
"VaCentral\\": "src/"
|
"VaCentral\\": "src/"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
"notification-url": "http://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
"MIT"
|
"MIT"
|
||||||
],
|
],
|
||||||
"time": "2017-12-08T04:00:06+00:00"
|
"time": "2017-12-08 04:00:06"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "nesbot/carbon",
|
"name": "nesbot/carbon",
|
||||||
@@ -2311,7 +2311,7 @@
|
|||||||
"PhpParser\\": "lib/PhpParser"
|
"PhpParser\\": "lib/PhpParser"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
"notification-url": "http://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
"BSD-3-Clause"
|
"BSD-3-Clause"
|
||||||
],
|
],
|
||||||
@@ -2744,7 +2744,7 @@
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
"notification-url": "http://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
"MIT"
|
"MIT"
|
||||||
],
|
],
|
||||||
@@ -2897,7 +2897,7 @@
|
|||||||
"Prophecy\\": "src/"
|
"Prophecy\\": "src/"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
"notification-url": "http://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
"MIT"
|
"MIT"
|
||||||
],
|
],
|
||||||
@@ -3015,7 +3015,7 @@
|
|||||||
"src/"
|
"src/"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
"notification-url": "http://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
"BSD-3-Clause"
|
"BSD-3-Clause"
|
||||||
],
|
],
|
||||||
@@ -3156,7 +3156,7 @@
|
|||||||
"src/"
|
"src/"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
"notification-url": "http://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
"BSD-3-Clause"
|
"BSD-3-Clause"
|
||||||
],
|
],
|
||||||
@@ -3237,7 +3237,7 @@
|
|||||||
"src/"
|
"src/"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
"notification-url": "http://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
"BSD-3-Clause"
|
"BSD-3-Clause"
|
||||||
],
|
],
|
||||||
@@ -3358,7 +3358,7 @@
|
|||||||
"PragmaRX\\Version\\Tests\\": "tests/"
|
"PragmaRX\\Version\\Tests\\": "tests/"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
"notification-url": "http://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
"MIT"
|
"MIT"
|
||||||
],
|
],
|
||||||
@@ -3418,7 +3418,7 @@
|
|||||||
"PragmaRX\\Yaml\\Tests\\": "tests/"
|
"PragmaRX\\Yaml\\Tests\\": "tests/"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
"notification-url": "http://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
"MIT"
|
"MIT"
|
||||||
],
|
],
|
||||||
@@ -3481,7 +3481,7 @@
|
|||||||
"Prettus\\Repository\\": "src/Prettus/Repository/"
|
"Prettus\\Repository\\": "src/Prettus/Repository/"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
"notification-url": "http://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
"MIT"
|
"MIT"
|
||||||
],
|
],
|
||||||
@@ -3950,7 +3950,7 @@
|
|||||||
"Laratrust\\": "src/"
|
"Laratrust\\": "src/"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
"notification-url": "http://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
"MIT"
|
"MIT"
|
||||||
],
|
],
|
||||||
@@ -4153,7 +4153,7 @@
|
|||||||
"src/"
|
"src/"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
"notification-url": "http://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
"BSD-3-Clause"
|
"BSD-3-Clause"
|
||||||
],
|
],
|
||||||
@@ -4728,7 +4728,7 @@
|
|||||||
"src/helpers.php"
|
"src/helpers.php"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
"notification-url": "http://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
"MIT"
|
"MIT"
|
||||||
],
|
],
|
||||||
@@ -4911,7 +4911,7 @@
|
|||||||
"/Tests/"
|
"/Tests/"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
"notification-url": "http://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
"MIT"
|
"MIT"
|
||||||
],
|
],
|
||||||
@@ -4960,7 +4960,7 @@
|
|||||||
"/Tests/"
|
"/Tests/"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
"notification-url": "http://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
"MIT"
|
"MIT"
|
||||||
],
|
],
|
||||||
@@ -5020,7 +5020,7 @@
|
|||||||
"/Tests/"
|
"/Tests/"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
"notification-url": "http://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
"MIT"
|
"MIT"
|
||||||
],
|
],
|
||||||
@@ -5076,7 +5076,7 @@
|
|||||||
"/Tests/"
|
"/Tests/"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
"notification-url": "http://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
"MIT"
|
"MIT"
|
||||||
],
|
],
|
||||||
@@ -5139,7 +5139,7 @@
|
|||||||
"/Tests/"
|
"/Tests/"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
"notification-url": "http://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
"MIT"
|
"MIT"
|
||||||
],
|
],
|
||||||
@@ -5188,7 +5188,7 @@
|
|||||||
"/Tests/"
|
"/Tests/"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
"notification-url": "http://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
"MIT"
|
"MIT"
|
||||||
],
|
],
|
||||||
@@ -5242,7 +5242,7 @@
|
|||||||
"/Tests/"
|
"/Tests/"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
"notification-url": "http://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
"MIT"
|
"MIT"
|
||||||
],
|
],
|
||||||
@@ -5330,7 +5330,7 @@
|
|||||||
"/Tests/"
|
"/Tests/"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
"notification-url": "http://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
"MIT"
|
"MIT"
|
||||||
],
|
],
|
||||||
@@ -5379,7 +5379,7 @@
|
|||||||
"/Tests/"
|
"/Tests/"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
"notification-url": "http://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
"MIT"
|
"MIT"
|
||||||
],
|
],
|
||||||
@@ -5531,7 +5531,7 @@
|
|||||||
"bootstrap.php"
|
"bootstrap.php"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
"notification-url": "http://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
"MIT"
|
"MIT"
|
||||||
],
|
],
|
||||||
@@ -5588,7 +5588,7 @@
|
|||||||
"bootstrap.php"
|
"bootstrap.php"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
"notification-url": "http://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
"MIT"
|
"MIT"
|
||||||
],
|
],
|
||||||
@@ -5647,7 +5647,7 @@
|
|||||||
"Resources/stubs"
|
"Resources/stubs"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
"notification-url": "http://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
"MIT"
|
"MIT"
|
||||||
],
|
],
|
||||||
@@ -5699,7 +5699,7 @@
|
|||||||
"Symfony\\Polyfill\\Util\\": ""
|
"Symfony\\Polyfill\\Util\\": ""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
"notification-url": "http://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
"MIT"
|
"MIT"
|
||||||
],
|
],
|
||||||
@@ -5754,7 +5754,7 @@
|
|||||||
"/Tests/"
|
"/Tests/"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
"notification-url": "http://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
"MIT"
|
"MIT"
|
||||||
],
|
],
|
||||||
@@ -5811,7 +5811,7 @@
|
|||||||
"/Tests/"
|
"/Tests/"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
"notification-url": "http://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
"MIT"
|
"MIT"
|
||||||
],
|
],
|
||||||
@@ -5894,7 +5894,7 @@
|
|||||||
"/Tests/"
|
"/Tests/"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
"notification-url": "http://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
"MIT"
|
"MIT"
|
||||||
],
|
],
|
||||||
@@ -5978,7 +5978,7 @@
|
|||||||
"/Tests/"
|
"/Tests/"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
"notification-url": "http://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
"MIT"
|
"MIT"
|
||||||
],
|
],
|
||||||
@@ -6046,7 +6046,7 @@
|
|||||||
"/Tests/"
|
"/Tests/"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
"notification-url": "http://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
"MIT"
|
"MIT"
|
||||||
],
|
],
|
||||||
@@ -6111,7 +6111,7 @@
|
|||||||
"/Tests/"
|
"/Tests/"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
"notification-url": "http://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
"MIT"
|
"MIT"
|
||||||
],
|
],
|
||||||
@@ -6173,7 +6173,7 @@
|
|||||||
"/Tests/"
|
"/Tests/"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
"notification-url": "http://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
"MIT"
|
"MIT"
|
||||||
],
|
],
|
||||||
@@ -6304,7 +6304,7 @@
|
|||||||
"Tivie\\OS\\": "src/"
|
"Tivie\\OS\\": "src/"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
"notification-url": "http://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
"APACHE 2.0"
|
"APACHE 2.0"
|
||||||
],
|
],
|
||||||
@@ -6525,7 +6525,7 @@
|
|||||||
"Webpatser\\Uuid": "src/"
|
"Webpatser\\Uuid": "src/"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
"notification-url": "http://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
"MIT"
|
"MIT"
|
||||||
],
|
],
|
||||||
@@ -6654,7 +6654,7 @@
|
|||||||
"src/helper.php"
|
"src/helper.php"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
"notification-url": "http://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
"MIT"
|
"MIT"
|
||||||
],
|
],
|
||||||
@@ -6711,7 +6711,7 @@
|
|||||||
"Zend\\Diactoros\\": "src/"
|
"Zend\\Diactoros\\": "src/"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
"notification-url": "http://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
"BSD-2-Clause"
|
"BSD-2-Clause"
|
||||||
],
|
],
|
||||||
@@ -6899,6 +6899,61 @@
|
|||||||
],
|
],
|
||||||
"time": "2017-11-16T12:28:04+00:00"
|
"time": "2017-11-16T12:28:04+00:00"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "facebook/webdriver",
|
||||||
|
"version": "1.5.0",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/facebook/php-webdriver.git",
|
||||||
|
"reference": "86b5ca2f67173c9d34340845dd690149c886a605"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/facebook/php-webdriver/zipball/86b5ca2f67173c9d34340845dd690149c886a605",
|
||||||
|
"reference": "86b5ca2f67173c9d34340845dd690149c886a605",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"ext-curl": "*",
|
||||||
|
"ext-zip": "*",
|
||||||
|
"php": "^5.6 || ~7.0",
|
||||||
|
"symfony/process": "^2.8 || ^3.1 || ^4.0"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"friendsofphp/php-cs-fixer": "^2.0",
|
||||||
|
"guzzle/guzzle": "^3.4.1",
|
||||||
|
"php-coveralls/php-coveralls": "^1.0.2",
|
||||||
|
"php-mock/php-mock-phpunit": "^1.1",
|
||||||
|
"phpunit/phpunit": "^5.7",
|
||||||
|
"sebastian/environment": "^1.3.4 || ^2.0 || ^3.0",
|
||||||
|
"squizlabs/php_codesniffer": "^2.6",
|
||||||
|
"symfony/var-dumper": "^3.3 || ^4.0"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-community": "1.5-dev"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"Facebook\\WebDriver\\": "lib/"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "http://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"Apache-2.0"
|
||||||
|
],
|
||||||
|
"description": "A PHP client for Selenium WebDriver",
|
||||||
|
"homepage": "https://github.com/facebook/php-webdriver",
|
||||||
|
"keywords": [
|
||||||
|
"facebook",
|
||||||
|
"php",
|
||||||
|
"selenium",
|
||||||
|
"webdriver"
|
||||||
|
],
|
||||||
|
"time": "2017-11-15T11:08:09+00:00"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "filp/whoops",
|
"name": "filp/whoops",
|
||||||
"version": "2.1.14",
|
"version": "2.1.14",
|
||||||
@@ -6937,7 +6992,7 @@
|
|||||||
"Whoops\\": "src/Whoops/"
|
"Whoops\\": "src/Whoops/"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
"notification-url": "http://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
"MIT"
|
"MIT"
|
||||||
],
|
],
|
||||||
@@ -7055,6 +7110,67 @@
|
|||||||
],
|
],
|
||||||
"time": "2015-05-11T14:41:42+00:00"
|
"time": "2015-05-11T14:41:42+00:00"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "laravel/dusk",
|
||||||
|
"version": "v2.0.8",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/laravel/dusk.git",
|
||||||
|
"reference": "a7529e19592879d3a6408728080ba657499890bc"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/laravel/dusk/zipball/a7529e19592879d3a6408728080ba657499890bc",
|
||||||
|
"reference": "a7529e19592879d3a6408728080ba657499890bc",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"facebook/webdriver": "~1.0",
|
||||||
|
"illuminate/console": "~5.5",
|
||||||
|
"illuminate/support": "~5.5",
|
||||||
|
"nesbot/carbon": "~1.20",
|
||||||
|
"php": ">=5.6.4",
|
||||||
|
"symfony/console": "~3.2",
|
||||||
|
"symfony/process": "~3.2"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"mockery/mockery": "~1.0",
|
||||||
|
"phpunit/phpunit": "~6.0"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-master": "2.0-dev"
|
||||||
|
},
|
||||||
|
"laravel": {
|
||||||
|
"providers": [
|
||||||
|
"Laravel\\Dusk\\DuskServiceProvider"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"Laravel\\Dusk\\": "src/"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "http://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Taylor Otwell",
|
||||||
|
"email": "taylor@laravel.com"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Laravel Dusk provides simple end-to-end testing and browser automation.",
|
||||||
|
"keywords": [
|
||||||
|
"laravel",
|
||||||
|
"testing",
|
||||||
|
"webdriver"
|
||||||
|
],
|
||||||
|
"time": "2017-12-08T14:18:11+00:00"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "mockery/mockery",
|
"name": "mockery/mockery",
|
||||||
"version": "0.9.9",
|
"version": "0.9.9",
|
||||||
@@ -7279,7 +7395,7 @@
|
|||||||
"/Tests/"
|
"/Tests/"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
"notification-url": "http://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
"MIT"
|
"MIT"
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -0,0 +1,41 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Tests\Browser\Pages;
|
||||||
|
|
||||||
|
use Laravel\Dusk\Browser;
|
||||||
|
|
||||||
|
class HomePage extends Page
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Get the URL for the page.
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function url()
|
||||||
|
{
|
||||||
|
return '/';
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Assert that the browser is on the page.
|
||||||
|
*
|
||||||
|
* @param Browser $browser
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function assert(Browser $browser)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the element shortcuts for the page.
|
||||||
|
*
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
public function elements()
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
'@element' => '#selector',
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Tests\Browser\Pages;
|
||||||
|
|
||||||
|
use Laravel\Dusk\Page as BasePage;
|
||||||
|
|
||||||
|
abstract class Page extends BasePage
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Get the global element shortcuts for the site.
|
||||||
|
*
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
public static function siteElements()
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
'@element' => '#selector',
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Tests\Browser;
|
||||||
|
|
||||||
|
use Tests\DuskTestCase;
|
||||||
|
use Laravel\Dusk\Browser;
|
||||||
|
use Illuminate\Foundation\Testing\DatabaseMigrations;
|
||||||
|
|
||||||
|
class RegistrationTest extends DuskTestCase
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Test the registration
|
||||||
|
*/
|
||||||
|
public function testBasicExample()
|
||||||
|
{
|
||||||
|
/*$this->browse(function (Browser $browser) {
|
||||||
|
$browser->visit('/register')
|
||||||
|
->assertSee('Register');
|
||||||
|
});*/
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
*
|
||||||
|
!.gitignore
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
*
|
||||||
|
!.gitignore
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Tests;
|
||||||
|
|
||||||
|
use Illuminate\Support\Facades\Hash;
|
||||||
|
use Illuminate\Contracts\Console\Kernel;
|
||||||
|
|
||||||
|
trait CreatesApplication
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Creates the application.
|
||||||
|
*
|
||||||
|
* @return \Illuminate\Foundation\Application
|
||||||
|
*/
|
||||||
|
public function createApplication()
|
||||||
|
{
|
||||||
|
$app = require __DIR__ . '/../bootstrap/app.php';
|
||||||
|
$app->make(Kernel::class)->bootstrap();
|
||||||
|
//Hash::driver('bcrypt')->setRounds(4);
|
||||||
|
return $app;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,43 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Tests;
|
||||||
|
|
||||||
|
use Laravel\Dusk\TestCase as BaseTestCase;
|
||||||
|
use Facebook\WebDriver\Chrome\ChromeOptions;
|
||||||
|
use Facebook\WebDriver\Remote\RemoteWebDriver;
|
||||||
|
use Facebook\WebDriver\Remote\DesiredCapabilities;
|
||||||
|
|
||||||
|
abstract class DuskTestCase extends BaseTestCase
|
||||||
|
{
|
||||||
|
use CreatesApplication;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Prepare for Dusk test execution.
|
||||||
|
*
|
||||||
|
* @beforeClass
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public static function prepare()
|
||||||
|
{
|
||||||
|
static::startChromeDriver();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create the RemoteWebDriver instance.
|
||||||
|
*
|
||||||
|
* @return \Facebook\WebDriver\Remote\RemoteWebDriver
|
||||||
|
*/
|
||||||
|
protected function driver()
|
||||||
|
{
|
||||||
|
$options = (new ChromeOptions)->addArguments([
|
||||||
|
'--disable-gpu',
|
||||||
|
'--headless'
|
||||||
|
]);
|
||||||
|
|
||||||
|
return RemoteWebDriver::create(
|
||||||
|
'http://localhost:9515', DesiredCapabilities::chrome()->setCapability(
|
||||||
|
ChromeOptions::CAPABILITY, $options
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user