Skip to content

Commit 0a706d3

Browse files
committed
Move classes with reserved keywords in a separate file and skip test for php 7
1 parent 10a0a9d commit 0a706d3

File tree

2 files changed

+17
-9
lines changed

2 files changed

+17
-9
lines changed

tests/Doctrine/Tests/Common/Annotations/DocParserTest.php

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1180,6 +1180,11 @@ public function testCastNegativeFloat()
11801180

11811181
public function testReservedKeywordsInAnnotations()
11821182
{
1183+
if (PHP_VERSION_ID >= 70000) {
1184+
$this->markTestSkipped('This test requires PHP 5.6 or lower.');
1185+
}
1186+
require 'ReservedKeywordsClasses.php';
1187+
11831188
$parser = $this->createTestParser();
11841189

11851190
$result = $parser->parse('@Doctrine\Tests\Common\Annotations\True');
@@ -1356,15 +1361,6 @@ class Marker {
13561361
public $value;
13571362
}
13581363

1359-
/** @Annotation */
1360-
class True {}
1361-
1362-
/** @Annotation */
1363-
class False {}
1364-
1365-
/** @Annotation */
1366-
class Null {}
1367-
13681364
namespace Doctrine\Tests\Common\Annotations\FooBar;
13691365

13701366
/** @Annotation */
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?php
2+
3+
namespace Doctrine\Tests\Common\Annotations;
4+
5+
/** @Annotation */
6+
class True {}
7+
8+
/** @Annotation */
9+
class False {}
10+
11+
/** @Annotation */
12+
class Null {}

0 commit comments

Comments
 (0)