public function testNonStringThrowsException()
 {
     $dataValue = $this->getMockBuilder('\\SMWDataValue')->disableOriginalConstructor()->getMockForAbstractClass();
     $instance = new SomeValueDescriptionDeserializer();
     $instance->setDataValue($dataValue);
     $this->setExpectedException('InvalidArgumentException');
     $instance->deserialize(array());
 }
 public function testWikiPageValueOnNonMainNamespace()
 {
     $dataValue = $this->getMockBuilder('\\SMWDataValue')->disableOriginalConstructor()->setMethods(array('isValid', 'getDataItem', 'getProperty', 'setUserValue'))->getMockForAbstractClass();
     $dataValue->expects($this->atLeastOnce())->method('setUserValue')->with($this->anything(), $this->equalTo(false));
     $dataValue->expects($this->any())->method('isValid')->will($this->returnValue(true));
     $dataValue->expects($this->any())->method('getDataItem')->will($this->returnValue($this->dataItemFactory->newDIWikiPage('~Foo', NS_HELP)));
     $dataValue->expects($this->any())->method('getProperty')->will($this->returnValue($this->dataItemFactory->newDIProperty('Foo')));
     $instance = new SomeValueDescriptionDeserializer();
     $instance->setDataValue($dataValue);
     $this->assertInstanceOf('\\SMW\\Query\\Language\\Conjunction', $instance->deserialize('Help:~Foo'));
 }