[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: InstallCommand.php
<?php namespace Laravel\Dusk\Console; use Illuminate\Console\Command; class InstallCommand extends Command { /** * The name and signature of the console command. * * @var string */ protected $signature = 'dusk:install {--proxy= : The proxy to download the binary through (example: "tcp://127.0.0.1:9000")} {--ssl-no-verify : Bypass SSL certificate verification when installing through a proxy}'; /** * The console command description. * * @var string */ protected $description = 'Install Dusk into the application'; /** * Execute the console command. * * @return mixed */ public function handle() { if (! is_dir(base_path('tests/Browser/Pages'))) { mkdir(base_path('tests/Browser/Pages'), 0755, true); } if (! is_dir(base_path('tests/Browser/Components'))) { mkdir(base_path('tests/Browser/Components'), 0755, true); } if (! is_dir(base_path('tests/Browser/screenshots'))) { $this->createScreenshotsDirectory(); } if (! is_dir(base_path('tests/Browser/console'))) { $this->createConsoleDirectory(); } if (! is_dir(base_path('tests/Browser/source'))) { $this->createSourceDirectory(); } $stubs = [ 'ExampleTest.stub' => base_path('tests/Browser/ExampleTest.php'), 'HomePage.stub' => base_path('tests/Browser/Pages/HomePage.php'), 'DuskTestCase.stub' => base_path('tests/DuskTestCase.php'), 'Page.stub' => base_path('tests/Browser/Pages/Page.php'), ]; foreach ($stubs as $stub => $file) { if (! is_file($file)) { copy(__DIR__.'/../../stubs/'.$stub, $file); } } $this->info('Dusk scaffolding installed successfully.'); $this->comment('Downloading ChromeDriver binaries...'); $driverCommandArgs = ['--all' => true]; if ($this->option('proxy')) { $driverCommandArgs['--proxy'] = $this->option('proxy'); } if ($this->option('ssl-no-verify')) { $driverCommandArgs['--ssl-no-verify'] = true; } $this->call('dusk:chrome-driver', $driverCommandArgs); } /** * Create the screenshots directory. * * @return void */ protected function createScreenshotsDirectory() { mkdir(base_path('tests/Browser/screenshots'), 0755, true); file_put_contents(base_path('tests/Browser/screenshots/.gitignore'), '* !.gitignore '); } /** * Create the console directory. * * @return void */ protected function createConsoleDirectory() { mkdir(base_path('tests/Browser/console'), 0755, true); file_put_contents(base_path('tests/Browser/console/.gitignore'), '* !.gitignore '); } /** * Create the source directory. * * @return void */ protected function createSourceDirectory() { mkdir(base_path('tests/Browser/source'), 0755, true); file_put_contents(base_path('tests/Browser/source/.gitignore'), '* !.gitignore '); } }
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: server1.winmanyltd.com
Server IP: 203.161.60.52
PHP Version: 8.3.27
Server Software: Apache
System: Linux server1.winmanyltd.com 4.18.0-553.22.1.el8_10.x86_64 #1 SMP Tue Sep 24 05:16:59 EDT 2024 x86_64
HDD Total: 117.98 GB
HDD Free: 59.77 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Enabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes (py3)
gcc:
Yes
pkexec:
Yes
git:
Yes
User Info
Username: eliosofonline
User ID (UID): 1002
Group ID (GID): 1003
Script Owner UID: 1002
Current Dir Owner: 1002