mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-08-04 02:05:16 +02:00
Removed unnecessary getIDString() function in AbstractDBElement.
This commit is contained in:
parent
a3af55d4e2
commit
8b6fe757a0
26 changed files with 3 additions and 219 deletions
|
@ -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';
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
|
|
|
@ -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';
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue