-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Corrected English and adding usage notes (#16)
* Corrected English and adding usage notes * creating artisan command * updating README.md * Style CI fixes * adding in Service Provider and Style CI fixes * Style fixes * Modifying README
1 parent
842ff57
commit 6290865
Showing
4 changed files
with
115 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
<?php | ||
|
||
namespace Modelizer\Selenium\Console; | ||
|
||
use Illuminate\Console\Command; | ||
use Illuminate\Console\GeneratorCommand; | ||
|
||
class MakeSeleniumTestCommand extends GeneratorCommand | ||
{ | ||
/** | ||
* The console command name. | ||
* | ||
* @var string | ||
*/ | ||
protected $name = 'selenium:make:test'; | ||
|
||
/** | ||
* The console command description. | ||
* | ||
* @var string | ||
*/ | ||
protected $description = 'Create a new selenium test class'; | ||
|
||
/** | ||
* The type of class being generated. | ||
* | ||
* @var string | ||
*/ | ||
protected $type = 'SeleniumTest'; | ||
|
||
/** | ||
* Get the stub file for the generator. | ||
* | ||
* @return string | ||
*/ | ||
protected function getStub() | ||
{ | ||
return __DIR__.'/stubs/test.stub'; | ||
} | ||
|
||
/** | ||
* Get the destination class path. | ||
* | ||
* @param string $name | ||
* | ||
* @return string | ||
*/ | ||
protected function getPath($name) | ||
{ | ||
$name = str_replace($this->laravel->getNamespace(), '', $name); | ||
|
||
return $this->laravel['path.base'].'/tests/'.str_replace('\\', '/', $name).'.php'; | ||
} | ||
|
||
/** | ||
* Get the default namespace for the class. | ||
* | ||
* @param string $rootNamespace | ||
* | ||
* @return string | ||
*/ | ||
protected function getDefaultNamespace($rootNamespace) | ||
{ | ||
return $rootNamespace; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php | ||
|
||
use Illuminate\Foundation\Testing\WithoutMiddleware; | ||
use Illuminate\Foundation\Testing\DatabaseMigrations; | ||
use Illuminate\Foundation\Testing\DatabaseTransactions; | ||
use Modelizer\Selenium\SeleniumTestCase; | ||
|
||
class DummyClass extends SeleniumTestCase | ||
{ | ||
/** | ||
* A basic test example. | ||
* | ||
* @return void | ||
*/ | ||
public function testExample() | ||
{ | ||
$this->visit('/'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters