Issue #3205037 by longwave, neclimdul: Drupal\Tests\Component\Annotation\PluginIdTest tests a non-existent constructor

merge-requests/602/head
Alex Pott 2021-04-27 15:35:17 +01:00
parent 9298836906
commit 70eb124d5f
No known key found for this signature in database
GPG Key ID: 31905460D4A69276
1 changed files with 3 additions and 12 deletions

View File

@ -15,17 +15,8 @@ class PluginIdTest extends TestCase {
* @covers ::get * @covers ::get
*/ */
public function testGet() { public function testGet() {
// Assert plugin starts empty regardless of constructor. // Assert plugin starts empty.
$plugin = new PluginID([ $plugin = new PluginID();
'foo' => 'bar',
'biz' => [
'baz' => 'boom',
],
'nestedAnnotation' => new PluginID([
'foo' => 'bar',
]),
'value' => 'biz',
]);
$this->assertEquals([ $this->assertEquals([
'id' => NULL, 'id' => NULL,
'class' => NULL, 'class' => NULL,
@ -47,7 +38,7 @@ class PluginIdTest extends TestCase {
* @covers ::getId * @covers ::getId
*/ */
public function testGetId() { public function testGetId() {
$plugin = new PluginID([]); $plugin = new PluginID();
$plugin->value = 'example'; $plugin->value = 'example';
$this->assertEquals('example', $plugin->getId()); $this->assertEquals('example', $plugin->getId());
} }