Vincent Klaiber
9 years ago
6 changed files with 148 additions and 37 deletions
-
13composer.json
-
83src/SearchyServiceProvider.php
-
0tests/.gitkeep
-
26tests/AbstractTestCase.php
-
48tests/Facades/SearchyTest.php
-
15tests/ServiceProviderTest.php
@ -0,0 +1,26 @@ |
|||
<?php |
|||
|
|||
namespace TomLingham\Tests\Searchy; |
|||
|
|||
use GrahamCampbell\TestBench\AbstractPackageTestCase; |
|||
use TomLingham\Searchy\SearchyServiceProvider; |
|||
|
|||
/** |
|||
* This is the abstract test case class. |
|||
* |
|||
* @author Vincent Klaiber <hello@vinkla.com> |
|||
*/ |
|||
abstract class AbstractTestCase extends AbstractPackageTestCase |
|||
{ |
|||
/** |
|||
* Get the service provider class. |
|||
* |
|||
* @param \Illuminate\Contracts\Foundation\Application $app |
|||
* |
|||
* @return string |
|||
*/ |
|||
protected function getServiceProviderClass($app) |
|||
{ |
|||
return SearchyServiceProvider::class; |
|||
} |
|||
} |
@ -0,0 +1,48 @@ |
|||
<?php |
|||
|
|||
namespace TomLingham\Tests\Searchy\Facades; |
|||
|
|||
use GrahamCampbell\TestBenchCore\FacadeTrait; |
|||
use TomLingham\Searchy\Facades\Searchy; |
|||
use TomLingham\Searchy\SearchBuilder; |
|||
use TomLingham\Tests\Searchy\AbstractTestCase; |
|||
|
|||
/** |
|||
* This is the searchy facade test class. |
|||
* |
|||
* @author Vincent Klaiber <hello@vinkla.com> |
|||
*/ |
|||
class SearchyTest extends AbstractTestCase |
|||
{ |
|||
use FacadeTrait; |
|||
|
|||
/** |
|||
* Get the facade accessor. |
|||
* |
|||
* @return string |
|||
*/ |
|||
protected function getFacadeAccessor() |
|||
{ |
|||
return 'searchy'; |
|||
} |
|||
|
|||
/** |
|||
* Get the facade class. |
|||
* |
|||
* @return string |
|||
*/ |
|||
protected function getFacadeClass() |
|||
{ |
|||
return Searchy::class; |
|||
} |
|||
|
|||
/** |
|||
* Get the facade root. |
|||
* |
|||
* @return string |
|||
*/ |
|||
protected function getFacadeRoot() |
|||
{ |
|||
return SearchBuilder::class; |
|||
} |
|||
} |
@ -0,0 +1,15 @@ |
|||
<?php |
|||
|
|||
namespace TomLingham\Tests\Searchy; |
|||
|
|||
use GrahamCampbell\TestBenchCore\ServiceProviderTrait; |
|||
|
|||
/** |
|||
* This is the service provider test. |
|||
* |
|||
* @author Vincent Klaiber <hello@vinkla.com> |
|||
*/ |
|||
class ServiceProviderTest extends AbstractTestCase |
|||
{ |
|||
use ServiceProviderTrait; |
|||
} |
Write
Preview
Loading…
Cancel
Save
Reference in new issue