From 30dcece1257d6a722d9080c7fdb116dc2954d737 Mon Sep 17 00:00:00 2001 From: Marco Pivetta Date: Tue, 20 Jan 2015 15:30:47 +0100 Subject: [PATCH] DDC-2704 - covering code handling class metadata skipping of static properties --- .../Tests/Models/DirectoryTree/AbstractContentItem.php | 7 +++++++ tests/Doctrine/Tests/ORM/Mapping/ClassMetadataTest.php | 6 ++++++ 2 files changed, 13 insertions(+) diff --git a/tests/Doctrine/Tests/Models/DirectoryTree/AbstractContentItem.php b/tests/Doctrine/Tests/Models/DirectoryTree/AbstractContentItem.php index d48b6e19c..d2ba439a0 100644 --- a/tests/Doctrine/Tests/Models/DirectoryTree/AbstractContentItem.php +++ b/tests/Doctrine/Tests/Models/DirectoryTree/AbstractContentItem.php @@ -46,6 +46,13 @@ abstract class AbstractContentItem */ private $nodeIsLoaded = false; + /** + * This field is transient on purpose + * + * @var mixed + */ + public static $fileSystem; + public function __construct(Directory $parentDir = null) { $this->parentDirectory = $parentDir; diff --git a/tests/Doctrine/Tests/ORM/Mapping/ClassMetadataTest.php b/tests/Doctrine/Tests/ORM/Mapping/ClassMetadataTest.php index 4a7882862..a6aafce96 100644 --- a/tests/Doctrine/Tests/ORM/Mapping/ClassMetadataTest.php +++ b/tests/Doctrine/Tests/ORM/Mapping/ClassMetadataTest.php @@ -1188,6 +1188,12 @@ class ClassMetadataTest extends \Doctrine\Tests\OrmTestCase ], $propertyNames ); + + $this->assertNotContains( + 'Doctrine\Tests\Models\DirectoryTree\AbstractContentItem::fileSystem', + $propertyNames, + 'Abstract properties should not be part of class metadata information' + ); } }