public function testIsFromCache() { $query = $this->getMockBuilder('\\SMWQuery')->disableOriginalConstructor()->getMock(); $store = $this->getMockBuilder('\\SMW\\Store')->disableOriginalConstructor()->getMockForAbstractClass(); $printRequests = array(); $results = array(); $instance = new QueryResult($printRequests, $query, $results, $store); $this->assertFalse($instance->isFromCache()); $instance->setFromCache(true); $this->assertTrue($instance->isFromCache()); }