public function process(array $case) { // Allows for data to be re-read from the DB instead of being fetched // from the store-id-cache if (isset($case['store']['clear-cache']) && $case['store']['clear-cache']) { $this->store->clear(); } $this->assertRdfOutputForCase($case); }
private function assertSemanticDataForCase($case) { // Allows for data to be re-read from the DB instead of being fetched // from the store-id-cache if (isset($case['store']['clear-cache']) && $case['store']['clear-cache']) { $this->store->clear(); } if (!isset($case['assert-store']) || !isset($case['assert-store']['semantic-data'])) { return; } $subject = DIWikiPage::newFromText($case['subject'], isset($case['namespace']) ? constant($case['namespace']) : NS_MAIN); $semanticData = $this->store->getSemanticData($subject); if ($this->debug) { print_r($semanticData); } if (isset($case['errors']) && $case['errors'] !== array()) { $this->assertNotEmpty($semanticData->getErrors()); } $this->semanticDataValidator->assertThatPropertiesAreSet($case['assert-store']['semantic-data'], $semanticData, $case['about']); $this->assertInProperties($subject, $case['assert-store']['semantic-data'], $case['about']); }