PHP code example of damianlewis / octobertesting-plugin
1. Go to this page and download the library: Download damianlewis/octobertesting-plugin library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
damianlewis / octobertesting-plugin example snippets
namespace Acme\Blog\Tests\Feature;
use Tests\PluginTestCase;
class ExampleTest extends PluginTestCase
{
/**
* A basic test example.
*
* @return void
*/
public function testBasicTest()
{
$response = $this->get('/');
$response->assertStatus(200);
}
}
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;
...
protected function user()
{
return (object)[
'login' => 'admin',
'password' => 'admin'
];
}
}
$options = (new ChromeOptions)->addArguments([
'--disable-gpu',
'--window-size=1280,1024',
'--headless'
]);
bash
php artisan dusk:install
bash
php artisan dusk
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.