Skip to content

Commit

Permalink
added last lot of tests
Browse files Browse the repository at this point in the history
  • Loading branch information
c-harris committed Feb 21, 2020
1 parent 2c5f6d3 commit 53db101
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/Unit/ClassFinderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
namespace Tests\Cruxinator\ClassFinder\Unit;


use Cruxinator\ClassFinder\ClassFinder;
use Tests\Cruxinator\ClassFinder\ClassFinderConcrete;
use Tests\Cruxinator\ClassFinder\TestCase;

Expand All @@ -19,6 +20,11 @@ public function setUp():void
$this->classFinder = new ClassFinderConcrete();
}

public function testSelf(){
$classes = $this->classFinder->getClasses("Cruxinator\\ClassFinder\\");
$this->assertEquals(1,count($classes));
$this->assertEquals(ClassFinder::class, $classes[0]);
}

public function testFindPsr(){
$classes = $this->classFinder->getClasses("Psr\\Log\\");
Expand All @@ -31,6 +37,11 @@ public function testFindPsr(){
$this->assertEquals(count($classes), count($twoClasses));
}

public function testTwoCallsSameFinder(){
$this->testFindPsr();
$this->testSelf();
}

public function testFindPsrNotAbstract(){
$classes = $this->classFinder->getClasses("Psr\\Log\\", function($class){
$reflectionClass = new \ReflectionClass($class);
Expand Down

0 comments on commit 53db101

Please sign in to comment.