mirror of
				https://github.com/kevinveenbirkenbach/infinito.git
				synced 2025-10-31 17:29:04 +00:00 
			
		
		
		
	Refactored code through substituting by PureSource
This commit is contained in:
		| @@ -6,9 +6,9 @@ use PHPUnit\Framework\TestCase; | ||||
| use App\Entity\Source\SourceInterface; | ||||
| use App\Entity\Meta\LawInterface; | ||||
| use Doctrine\Common\Collections\Collection; | ||||
| use App\Entity\Source\AbstractSource; | ||||
| use App\Entity\EntityInterface; | ||||
| use App\Entity\Meta\Relation\Parent\CreatorRelationInterface; | ||||
| use App\Entity\Source\PureSource; | ||||
|  | ||||
| /** | ||||
|  * @author kevinfrantz | ||||
| @@ -20,15 +20,9 @@ class AbstractSourceTest extends TestCase | ||||
|      */ | ||||
|     protected $source; | ||||
|  | ||||
|     private function getSourceDummy(): SourceInterface | ||||
|     { | ||||
|         return new class() extends AbstractSource { | ||||
|         }; | ||||
|     } | ||||
|  | ||||
|     public function setUp() | ||||
|     { | ||||
|         $this->source = $this->getSourceDummy(); | ||||
|         $this->source = new PureSource(); | ||||
|     } | ||||
|  | ||||
|     public function testConstructor(): void | ||||
|   | ||||
| @@ -5,9 +5,9 @@ namespace Tests\Unit\Entity\Source\Complex\Collection; | ||||
| use PHPUnit\Framework\TestCase; | ||||
| use Doctrine\Common\Collections\Collection; | ||||
| use Doctrine\Common\Collections\ArrayCollection; | ||||
| use App\Entity\Source\AbstractSource; | ||||
| use App\Entity\Source\Complex\Collection\TreeCollectionSourceInterface; | ||||
| use App\Entity\Source\Complex\Collection\TreeCollectionSource; | ||||
| use App\Entity\Source\PureSource; | ||||
|  | ||||
| /** | ||||
|  * @author kevinfrantz | ||||
| @@ -32,8 +32,7 @@ class TreeCollectionSourceTest extends TestCase | ||||
|  | ||||
|     public function testAccessors() | ||||
|     { | ||||
|         $member = new class() extends AbstractSource { | ||||
|         }; | ||||
|         $member = new PureSource(); | ||||
|         $this->tree->setCollection(new ArrayCollection([ | ||||
|             $member, | ||||
|         ])); | ||||
|   | ||||
| @@ -8,6 +8,9 @@ use App\Entity\Source\PureSource; | ||||
| use App\Entity\Source\AbstractSource; | ||||
| use PHPUnit\Framework\TestCase; | ||||
|  | ||||
| /** | ||||
|  * @author kevinfrantz | ||||
|  */ | ||||
| class PureSourceTest extends TestCase | ||||
| { | ||||
|     /** | ||||
|   | ||||
		Reference in New Issue
	
	Block a user