Skip to content

Commit 03e2ece

Browse files
committed
Test redeclaration of attributes throws error.
1 parent 756a083 commit 03e2ece

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

Zend/tests/attributes_004.phpt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
--TEST--
2+
Redclare attribute errors
3+
--FILE--
4+
<?php
5+
6+
<<A>>
7+
<<A>>
8+
function foo() {}
9+
--EXPECTF--
10+
Fatal error: Redeclared attribute A in %s on line %d

Zend/tests/attributes_005.phpt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
--TEST--
2+
Redclare resolved attribute errors
3+
--FILE--
4+
<?php
5+
6+
use Test\Attr;
7+
8+
<<Attr>>
9+
<<\Test\Attr>>
10+
function foo() {}
11+
--EXPECTF--
12+
Fatal error: Redeclared attribute Test\Attr in %s on line %d

0 commit comments

Comments
 (0)