-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #28 from richardbishopme/master
ClassFinder: Fix issue with old string helper methods
- Loading branch information
Showing
2 changed files
with
39 additions
and
2 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,36 @@ | ||
<?php | ||
|
||
namespace Christophrumpel\NovaNotifications\tests; | ||
|
||
use Christophrumpel\NovaNotifications\ClassFinder; | ||
|
||
class ClassFinderTest extends TestCase | ||
{ | ||
/** | ||
* @test | ||
**/ | ||
public function it_find_classes() | ||
{ | ||
$this->app->setBasePath(__DIR__.'/..'); | ||
|
||
$classFinder = app(ClassFinder::class); | ||
|
||
$response = $classFinder->find('Illuminate\Database\Eloquent\Model', ['App']); | ||
|
||
$this->assertInstanceOf('Illuminate\Support\Collection', $response); | ||
} | ||
|
||
/** | ||
* @test | ||
**/ | ||
public function it_find_classes_which_are_extending_a_specific_class() | ||
{ | ||
$this->app->setBasePath(__DIR__.'/..'); | ||
|
||
$classFinder = app(ClassFinder::class); | ||
|
||
$response = $classFinder->findByExtending('Illuminate\Database\Eloquent\Model', ['App']); | ||
|
||
$this->assertInstanceOf('Illuminate\Support\Collection', $response); | ||
} | ||
} |