|
11 | 11 |
|
12 | 12 | namespace PHPCR\Tests\NodeTypeDiscovery;
|
13 | 13 |
|
| 14 | +use PHPCR\NodeType\NodeTypeInterface; |
| 15 | +use PHPCR\NodeType\NodeTypeManagerInterface; |
| 16 | +use PHPCR\NodeType\PropertyDefinitionInterface; |
14 | 17 | use PHPCR\Query\QOM\QueryObjectModelConstantsInterface;
|
15 | 18 |
|
16 | 19 | /**
|
|
20 | 23 | */
|
21 | 24 | class PropertyDefinitionTest extends \PHPCR\Test\BaseCase
|
22 | 25 | {
|
| 26 | + /** |
| 27 | + * @var NodeTypeInterface |
| 28 | + */ |
23 | 29 | private static $base;
|
| 30 | + |
| 31 | + /** |
| 32 | + * @var NodeTypeInterface |
| 33 | + */ |
24 | 34 | private static $address;
|
| 35 | + |
| 36 | + /** |
| 37 | + * @var NodeTypeInterface |
| 38 | + */ |
25 | 39 | private static $mix_created;
|
| 40 | + |
| 41 | + /** |
| 42 | + * @var NodeTypeInterface |
| 43 | + */ |
26 | 44 | private static $resource;
|
27 | 45 |
|
28 |
| - /** nt:base property */ |
29 |
| - private $primaryType; // (NAME) mandatory autocreated protected COMPUTE |
30 |
| - private $mixinTypes; // (NAME) protected multiple COMPUTE |
| 46 | + // properties of nt:base |
| 47 | + /** |
| 48 | + * (NAME) mandatory autocreated protected COMPUTE |
| 49 | + * @var PropertyDefinitionInterface |
| 50 | + */ |
| 51 | + private $primaryType; |
| 52 | + |
| 53 | + /** |
| 54 | + * (NAME) protected multiple COMPUTE |
| 55 | + * @var PropertyDefinitionInterface |
| 56 | + */ |
| 57 | + private $mixinTypes; |
| 58 | + |
31 | 59 | /** properties of nt:address */
|
32 |
| - private $workspace; // (STRING) |
33 |
| - private $pathprop; // (PATH) |
34 |
| - private $id; // (WEAKREFERENCE) |
35 |
| - /** property of mix:created */ |
36 |
| - private $created; // (DATE) autocreated protected |
37 |
| - /** property of nt:resource */ |
38 |
| - private $data; // (BINARY) mandatory |
| 60 | + |
| 61 | + /** |
| 62 | + * (STRING) |
| 63 | + * @var PropertyDefinitionInterface |
| 64 | + */ |
| 65 | + private $workspace; |
| 66 | + |
| 67 | + /** |
| 68 | + * (PATH) |
| 69 | + * @var PropertyDefinitionInterface |
| 70 | + */ |
| 71 | + private $pathprop; |
| 72 | + |
| 73 | + /** |
| 74 | + * (WEAKREFERENCE) |
| 75 | + * @var PropertyDefinitionInterface |
| 76 | + */ |
| 77 | + private $id; |
| 78 | + |
| 79 | + /** |
| 80 | + * (DATE) autocreated protected |
| 81 | + * property of mix:created |
| 82 | + * @var PropertyDefinitionInterface |
| 83 | + */ |
| 84 | + private $created; // |
| 85 | + |
| 86 | + /** |
| 87 | + * (BINARY) mandatory |
| 88 | + * property of nt:resource |
| 89 | + * @var PropertyDefinitionInterface |
| 90 | + */ |
| 91 | + private $data; // |
39 | 92 |
|
40 | 93 | public static function setupBeforeClass($fixtures = false)
|
41 | 94 | {
|
42 | 95 | parent::setupBeforeClass(); // load default fixtures
|
| 96 | + /** @var NodeTypeManagerInterface $ntm */ |
43 | 97 | $ntm = self::$staticSharedFixture['session']->getWorkspace()->getNodeTypeManager();
|
44 | 98 | self::$base = $ntm->getNodeType('nt:base');
|
45 | 99 | self::$address = $ntm->getNodeType('nt:address');
|
@@ -238,7 +292,7 @@ public function testGetPropertyDefinitionExact()
|
238 | 292 | $this->assertEquals('jcr:created', $propDef->getName());
|
239 | 293 | }
|
240 | 294 |
|
241 |
| - public function estGetPropertyDefinitionWildcard() |
| 295 | + public function testGetPropertyDefinitionWildcard() |
242 | 296 | {
|
243 | 297 | $node = $this->rootNode->getNode('tests_general_base/numberPropertyNode/jcr:content');
|
244 | 298 | $valProperty = $node->getProperty('foo');
|
|
0 commit comments