public function testAccept() { $mock = $this->getMock('PHPCR\\ItemVisitorInterface', array('visit')); $mock->expects($this->once())->method('visit')->with($this->equalTo($this->createdProperty)); $this->createdProperty->accept($mock); }