public function testGetDefaultStore() { $instance = StoreFactory::getStore(); $this->assertInstanceOf(Settings::newFromGlobals()->get('smwgDefaultStore'), $instance); $this->assertSame(StoreFactory::getStore(), $instance); StoreFactory::clear(); $this->assertNotSame(StoreFactory::getStore(), $instance); }
/** * @dataProvider propertyObjectProvider */ public function testPhpSerialization($property, $dataItem) { $instance = StubSemanticData::newFromSemanticData(new SemanticData(new DIWikiPage('Foo', NS_MAIN)), $this->store); $instance->addPropertyObjectValue($property, $dataItem); StoreFactory::setDefaultStoreForUnitTest($this->store); $serialization = serialize($instance); $this->assertEquals($instance->getHash(), unserialize($serialization)->getHash()); StoreFactory::clear(); }
protected function tearDown() { StoreFactory::clear(); }
protected function tearDown() { StoreFactory::clear(); $GLOBALS['smwgQuerySources'] = $this->smwgQuerySources; parent::tearDown(); }