|
7 | 7 | use Doctrine\Common\Annotations\Annotation\Target;
|
8 | 8 | use Doctrine\Common\Annotations\AnnotationException;
|
9 | 9 | use Doctrine\Common\Annotations\DocParser;
|
10 |
| -use Doctrine\Common\Annotations\NamedArgumentConstructorAnnotation; |
11 | 10 | use Doctrine\Tests\Common\Annotations\Fixtures\AnnotationTargetAll;
|
12 | 11 | use Doctrine\Tests\Common\Annotations\Fixtures\AnnotationWithConstants;
|
13 | 12 | use Doctrine\Tests\Common\Annotations\Fixtures\ClassWithConstants;
|
@@ -1602,42 +1601,6 @@ public function testWillParseAnnotationSucceededByANonImmediateDash(): void
|
1602 | 1601 | self::assertInstanceOf(SomeAnnotationClassNameWithoutConstructorAndProperties::class, $result[0]);
|
1603 | 1602 | }
|
1604 | 1603 |
|
1605 |
| - public function testNamedArgumentsConstructorInterface(): void |
1606 |
| - { |
1607 |
| - $result = $this |
1608 |
| - ->createTestParser() |
1609 |
| - ->parse('/** @NamedAnnotation(foo="baz", bar=2222) */'); |
1610 |
| - |
1611 |
| - self::assertCount(1, $result); |
1612 |
| - self::assertInstanceOf(NamedAnnotation::class, $result[0]); |
1613 |
| - self::assertSame('baz', $result[0]->getFoo()); |
1614 |
| - self::assertSame(2222, $result[0]->getBar()); |
1615 |
| - } |
1616 |
| - |
1617 |
| - public function testNamedReorderedArgumentsConstructorInterface(): void |
1618 |
| - { |
1619 |
| - $result = $this |
1620 |
| - ->createTestParser() |
1621 |
| - ->parse('/** @NamedAnnotation(bar=2222, foo="baz") */'); |
1622 |
| - |
1623 |
| - self::assertCount(1, $result); |
1624 |
| - self::assertInstanceOf(NamedAnnotation::class, $result[0]); |
1625 |
| - self::assertSame('baz', $result[0]->getFoo()); |
1626 |
| - self::assertSame(2222, $result[0]->getBar()); |
1627 |
| - } |
1628 |
| - |
1629 |
| - public function testNamedArgumentsConstructorInterfaceWithDefaultValue(): void |
1630 |
| - { |
1631 |
| - $result = $this |
1632 |
| - ->createTestParser() |
1633 |
| - ->parse('/** @NamedAnnotation(foo="baz") */'); |
1634 |
| - |
1635 |
| - self::assertCount(1, $result); |
1636 |
| - self::assertInstanceOf(NamedAnnotation::class, $result[0]); |
1637 |
| - self::assertSame('baz', $result[0]->getFoo()); |
1638 |
| - self::assertSame(1234, $result[0]->getBar()); |
1639 |
| - } |
1640 |
| - |
1641 | 1604 | public function testNamedArgumentsConstructorAnnotation(): void
|
1642 | 1605 | {
|
1643 | 1606 | $result = $this
|
@@ -1751,31 +1714,6 @@ public function expectExceptionMessageMatches(string $regularExpression): void
|
1751 | 1714 | }
|
1752 | 1715 | }
|
1753 | 1716 |
|
1754 |
| -/** @Annotation */ |
1755 |
| -class NamedAnnotation implements NamedArgumentConstructorAnnotation |
1756 |
| -{ |
1757 |
| - /** @var string */ |
1758 |
| - private $foo; |
1759 |
| - /** @var int */ |
1760 |
| - private $bar; |
1761 |
| - |
1762 |
| - public function __construct(string $foo, int $bar = 1234) |
1763 |
| - { |
1764 |
| - $this->foo = $foo; |
1765 |
| - $this->bar = $bar; |
1766 |
| - } |
1767 |
| - |
1768 |
| - public function getFoo(): string |
1769 |
| - { |
1770 |
| - return $this->foo; |
1771 |
| - } |
1772 |
| - |
1773 |
| - public function getBar(): int |
1774 |
| - { |
1775 |
| - return $this->bar; |
1776 |
| - } |
1777 |
| -} |
1778 |
| - |
1779 | 1717 | /**
|
1780 | 1718 | * @Annotation
|
1781 | 1719 | * @NamedArgumentConstructor
|
|
0 commit comments