Removed unnecessary getIDString() function in AbstractDBElement.

This commit is contained in:
Jan Böhmer 2020-05-13 21:19:23 +02:00
parent a3af55d4e2
commit 8b6fe757a0
26 changed files with 3 additions and 219 deletions

View file

@ -83,10 +83,6 @@ class ElementTypeNameGeneratorTest extends WebTestCase
//Test exception for unknpwn type
$this->expectException(EntityNotSupportedException::class);
$this->service->getLocalizedTypeLabel(new class() extends AbstractDBElement {
public function getIDString(): string
{
return 'Stub';
}
});
}

View file

@ -65,12 +65,7 @@ class LabelGeneratorTest extends WebTestCase
$this->assertTrue($this->service->supports($options, new $class()));
//Ensure that another class is not supported
$not_supported = new class() extends AbstractDBElement {
public function getIDString(): string
{
return 'not_important';
}
};
$not_supported = new class() extends AbstractDBElement {};
$this->assertFalse($this->service->supports($options, $not_supported));
}

View file

@ -42,11 +42,6 @@ class AbstractElementProviderTest extends WebTestCase
$this->service = self::$container->get(AbstractDBElementProvider::class);
$this->target = new class() extends AbstractDBElement {
protected $id = 123;
public function getIDString(): string
{
return 'ignore';
}
};
}