public function testFromPhpcrNode() { $phpcrNode = $this->prophesize('PHPCR\\NodeInterface'); $prop1 = $this->prophesize('PHPCR\\PropertyInterface'); $prop1->getType()->willReturn(1); $prop1->getValue()->willReturn('Foo'); $phpcrNode->getProperties()->willReturn(array('prop1' => $prop1->reveal())); $node = new Node($phpcrNode->reveal()); $this->assertEquals(array('type' => 'String', 'value' => 'Foo'), $node->getProperty('prop1')); }