Refactored code through substituting by PureSource

This commit is contained in:
Kevin Frantz
2019-01-04 22:09:05 +01:00
parent 74c404a9ce
commit f931f824fb
11 changed files with 34 additions and 74 deletions

View File

@@ -11,7 +11,7 @@ use Doctrine\Common\Collections\ArrayCollection;
use App\Entity\Source\Complex\FullPersonNameSource;
use App\Domain\SourceManagement\SourceMemberInformation;
use App\Domain\SourceManagement\SourceMemberInformationInterface;
use App\Entity\Source\AbstractSource;
use App\Entity\Source\PureSource;
class SourceMemberInformationTest extends TestCase
{
@@ -25,12 +25,6 @@ class SourceMemberInformationTest extends TestCase
*/
private $sourceMemberInformation;
private function createSourceMock(): SourceInterface
{
return new class() extends AbstractSource {
};
}
public function setUp(): void
{
$this->source = new UserSource();
@@ -75,7 +69,7 @@ class SourceMemberInformationTest extends TestCase
public function testError(): void
{
$this->expectException(\Error::class);
$this->source->getMemberRelation()->getMembers()->add($this->createSourceMock());
$this->source->getMemberRelation()->getMembers()->add(new PureSource());
$this->sourceMemberInformation->getAllMembers();
}
}