public function testParseValueWithErroredDv() { $store = $this->getMockBuilder('\\SMW\\Store')->disableOriginalConstructor()->setMethods(array('getRedirectTarget'))->getMockForAbstractClass(); $store->expects($this->atLeastOnce())->method('getPropertyValues')->will($this->returnValue(array($this->dataItemFactory->newDIBlob('Bar;Foobar')))); $store->expects($this->any())->method('getRedirectTarget')->will($this->returnArgument(0)); $this->testEnvironment->registerObject('Store', $store); $instance = new ReferenceValue(); $instance->setProperty($this->dataItemFactory->newDIProperty('Foo')); $instance->setUserValue('Foo;<>Foo'); $this->assertInstanceOf('\\SMWDIError', $instance->getDataItem()); $this->assertEquals(array('[2,"smw-datavalue-wikipage-invalid-title","<>Foo"]'), $instance->getErrors()); }