function test_schedule_restore_posts_rdfxml_with_a_snapshot_uri() { $fake_request_factory = new FakeRequestFactory(); $fake_request = new FakeHttpRequest(new HttpResponse()); $fake_request_factory->register('POST', "http://example.org/store/jobs", $fake_request); $queue = new JobQueue("http://example.org/store/jobs"); $queue->request_factory = $fake_request_factory; $response = $queue->schedule_restore('http://example.org/snapshot'); $parser = ARC2::getRDFXMLParser(array("bnode_prefix" => "genid", "base" => 'http://example.org/')); $parser->parse('http://example.org/', $fake_request->get_body()); $triples = $parser->getTriples(); $found_triple = false; foreach ($triples as $triple) { if ($triple['p'] == 'http://schemas.talis.com/2006/bigfoot/configuration#snapshotUri' && $triple['o_type'] == 'uri' && $triple['o'] == 'http://example.org/snapshot') { $found_triple = true; break; } } $this->assertTrue($found_triple); }