3 changed files with 88 additions and 1 deletions
@ -0,0 +1,39 @@ |
|||
<?php |
|||
|
|||
return [ |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Application Base Layout View |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| Default Laravel view layout |
|||
| |
|||
*/ |
|||
|
|||
'default_layout_view' => 'layouts.app', |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Base Test Class Path |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| Base TestCase Path on Laravel application |
|||
| |
|||
*/ |
|||
|
|||
'base_test_path' => 'tests/BrowserKitTest.php', |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Base Test Class |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| Base Test Class that used on Laravel application |
|||
| according to 'base_test_path' config above |
|||
| |
|||
*/ |
|||
|
|||
'base_test_class' => 'Tests\BrowserKitTest', |
|||
|
|||
]; |
|||
@ -0,0 +1,44 @@ |
|||
<?php |
|||
|
|||
namespace Tests; |
|||
|
|||
class ConfigTest extends TestCase |
|||
{ |
|||
/** @test */ |
|||
public function it_has_config_file() |
|||
{ |
|||
$this->assertTrue(is_array(config('simple-crud'))); |
|||
} |
|||
|
|||
/** @test */ |
|||
public function it_has_default_layout_view_config() |
|||
{ |
|||
$this->assertEquals('layouts.app', config('simple-crud.default_layout_view')); |
|||
|
|||
config(['simple-crud.default_layout_view' => 'layouts.master']); |
|||
|
|||
$this->assertEquals('layouts.master', config('simple-crud.default_layout_view')); |
|||
} |
|||
|
|||
/** @test */ |
|||
public function it_has_base_test_path_config() |
|||
{ |
|||
$this->assertEquals('tests/BrowserKitTest.php', config('simple-crud.base_test_path')); |
|||
} |
|||
|
|||
/** @test */ |
|||
public function it_has_base_test_class_config() |
|||
{ |
|||
$this->assertEquals('Tests\BrowserKitTest', config('simple-crud.base_test_class')); |
|||
} |
|||
|
|||
/** @test */ |
|||
public function config_file_can_be_published() |
|||
{ |
|||
$this->artisan('vendor:publish', ['--tag' => 'config', '--no-interaction' => true]); |
|||
|
|||
$this->assertFileExists(config_path('simple-crud.php')); |
|||
|
|||
$this->removeFileOrDir(config_path('simple-crud.php')); |
|||
} |
|||
} |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue