コード例 #1
1
 function test_get_item_uris()
 {
     $snapshots = new Snapshots(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'documents/snapshots.rdf');
     $expected = array("http://api.talis.com/stores/schema-cache/snapshots/20071129173353.tar");
     $actual = $snapshots->get_item_uris();
     $this->assertEquals($expected, $actual);
 }
コード例 #2
0
 function test_get_item_uris()
 {
     $fake_request_factory = new FakeRequestFactory();
     $fake_response = new HttpResponse();
     $fake_response->body = file_get_contents(realpath(dirname(__FILE__)) . '/documents/snapshots.rdf');
     $fake_request = new FakeHttpRequest($fake_response);
     $snapshotsUri = "http://example.com/store/snapshots";
     $fake_request_factory->register('GET', $snapshotsUri, $fake_request);
     $snapshots = new Snapshots($snapshotsUri, false, $fake_request_factory);
     $expected = array("http://api.talis.com/stores/schema-cache/snapshots/20071129173353.tar");
     $actual = $snapshots->get_item_uris();
     $this->assertEquals($expected, $actual);
 }