Example #1
0
 function test_get_first_query_profile_uri_handles_legacy_uris()
 {
     $qp_uris = array('ajmg-dev1' => 'http://api.talis.com/stores/ajmg-dev1/indexes/default/queryprofiles/default', 'beobal-dev1' => 'http://api.talis.com/stores/beobal-dev1/indexes/default/queryprofiles/default', 'bib-sandbox' => 'http://api.talis.com/stores/bib-sandbox/indexes/m21Advanced/queryprofiles/default', 'bib-talisuniplymouth-1' => 'http://api.talis.com/stores/bib-talisuniplymouth-1/config/queryprofiles/1', 'cenotelist' => 'http://api.talis.com/stores/cenotelist/indexes/default/queryprofiles/default', 'cnimages' => 'http://api.talis.com/stores/cnimages/indexes/cnimages/queryprofiles/default', 'danja-dev1' => 'http://api.talis.com/stores/danja-dev1/indexes/default/queryprofiles/default', 'dataMonitoring' => 'http://api.talis.com/stores/dataMonitoring/indexes/default/queryprofiles/default', 'engage-dev1' => 'http://api.talis.com/stores/engage-dev1/indexes/metaboxIndex/queryprofiles/default', 'engagetenant10' => 'http://api.talis.com/stores/engagetenant10/indexes/metaboxIndex/queryprofiles/default', 'engagetenant11' => 'http://api.talis.com/stores/engagetenant11/indexes/metaboxIndex/queryprofiles/default', 'engagetenant11' => 'http://api.talis.com/stores/engagetenant11/indexes/metaboxIndex/queryprofiles/default', 'engagetenant13' => 'http://api.talis.com/stores/engagetenant13/indexes/metaboxIndex/queryprofiles/default', 'engagetenant14' => 'http://api.talis.com/stores/engagetenant14/indexes/metaboxIndex/queryprofiles/default', 'engagetenant15' => 'http://api.talis.com/stores/engagetenant15/indexes/metaboxIndex/queryprofiles/default', 'engagetenant16' => 'http://api.talis.com/stores/engagetenant16/indexes/metaboxIndex/queryprofiles/default', 'engagetenant17' => 'http://api.talis.com/stores/engagetenant17/indexes/metaboxIndex/queryprofiles/default', 'engagetenant18' => 'http://api.talis.com/stores/engagetenant18/indexes/metaboxIndex/queryprofiles/default', 'engagetenant19' => 'http://api.talis.com/stores/engagetenant19/indexes/metaboxIndex/queryprofiles/default', 'engagetenant1' => 'http://api.talis.com/stores/engagetenant1/indexes/metaboxIndex/queryprofiles/default', 'engagetenant20' => 'http://api.talis.com/stores/engagetenant20/indexes/metaboxIndex/queryprofiles/default', 'engagetenant21' => 'http://api.talis.com/stores/engagetenant21/indexes/metaboxIndex/queryprofiles/default', 'engagetenant22' => 'http://api.talis.com/stores/engagetenant22/indexes/metaboxIndex/queryprofiles/default', 'engagetenant23' => 'http://api.talis.com/stores/engagetenant23/indexes/metaboxIndex/queryprofiles/default', 'engagetenant24' => 'http://api.talis.com/stores/engagetenant24/indexes/metaboxIndex/queryprofiles/default', 'engagetenant25' => 'http://api.talis.com/stores/engagetenant25/indexes/metaboxIndex/queryprofiles/default', 'engagetenant26' => 'http://api.talis.com/stores/engagetenant26/indexes/metaboxIndex/queryprofiles/default', 'engagetenant27' => 'http://api.talis.com/stores/engagetenant27/indexes/metaboxIndex/queryprofiles/default', 'engagetenant28' => 'http://api.talis.com/stores/engagetenant28/indexes/metaboxIndex/queryprofiles/default', 'engagetenant29' => 'http://api.talis.com/stores/engagetenant29/indexes/metaboxIndex/queryprofiles/default', 'engagetenant2' => 'http://api.talis.com/stores/engagetenant2/indexes/metaboxIndex/queryprofiles/default', 'engagetenant30' => 'http://api.talis.com/stores/engagetenant30/indexes/metaboxIndex/queryprofiles/default', 'engagetenant3' => 'http://api.talis.com/stores/engagetenant3/indexes/metaboxIndex/queryprofiles/default', 'engagetenant4' => 'http://api.talis.com/stores/engagetenant4/indexes/metaboxIndex/queryprofiles/default', 'engagetenant5' => 'http://api.talis.com/stores/engagetenant5/indexes/metaboxIndex/queryprofiles/default', 'engagetenant6' => 'http://api.talis.com/stores/engagetenant6/indexes/metaboxIndex/queryprofiles/default', 'engagetenant7' => 'http://api.talis.com/stores/engagetenant7/indexes/metaboxIndex/queryprofiles/default', 'engagetenant8' => 'http://api.talis.com/stores/engagetenant8/indexes/metaboxIndex/queryprofiles/default', 'engagetenant9' => 'http://api.talis.com/stores/engagetenant9/indexes/metaboxIndex/queryprofiles/default', 'engagetenantstore' => 'http://api.talis.com/stores/engagetenantstore/indexes/metaboxIndex/queryprofiles/default', 'gatech' => 'http://api.talis.com/stores/gatech/indexes/m21Advanced/queryprofiles/default', 'holdings' => 'http://api.talis.com/stores/holdings/indexes/m21Holdings/queryprofiles/default', 'iand-dev1' => 'http://api.talis.com/stores/iand-dev1/indexes/default/queryprofiles/default', 'iand-dev2' => 'http://api.talis.com/stores/iand-dev2/indexes/default/queryprofiles/default', 'iand-dev3' => 'http://api.talis.com/stores/iand-dev3/indexes/default/queryprofiles/default', 'image-sandbox' => 'http://api.talis.com/stores/image-sandbox/indexes/image-sandbox/queryprofiles/default', 'inst-5050' => 'http://api.talis.com/stores/inst-5050/indexes/m21Advanced/queryprofiles/default', 'inst-u138' => 'http://api.talis.com/stores/inst-u138/indexes/m21Advanced/queryprofiles/default', 'jingye-dev1' => 'http://api.talis.com/stores/jingye-dev1/indexes/default/queryprofiles/default', 'kwijibo-dev1' => 'http://api.talis.com/stores/kwijibo-dev1/indexes/default/queryprofiles/default', 'list-demo1' => 'http://api.talis.com/stores/list-demo1/indexes/metaboxIndex/queryprofiles/default', 'list-dev1' => 'http://api.talis.com/stores/list-dev1/indexes/metaboxIndex/queryprofiles/default', 'list-dev2' => 'http://api.talis.com/stores/list-dev2/indexes/metaboxIndex/queryprofiles/default', 'list-dev3' => 'http://api.talis.com/stores/list-dev3/indexes/metaboxIndex/queryprofiles/default', 'list-qa1' => 'http://api.talis.com/stores/list-qa1/indexes/metaboxIndex/queryprofiles/default', 'list-qa2' => 'http://api.talis.com/stores/list-qa2/indexes/metaboxIndex/queryprofiles/default', 'list-qa3' => 'http://api.talis.com/stores/list-qa3/indexes/metaboxIndex/queryprofiles/default', 'list-tenants-dev' => 'http://api.talis.com/stores/list-tenants-dev/indexes/metaboxIndex/queryprofiles/default', 'malcyl-dev1' => 'http://api.talis.com/stores/malcyl-dev1/indexes/default/queryprofiles/default', 'nuggetengage-demo1' => 'http://api.talis.com/stores/nuggetengage-demo1/indexes/metaboxIndex/queryprofiles/default', 'nuggetengage-demo2' => 'http://api.talis.com/stores/nuggetengage-demo2/indexes/metaboxIndex/queryprofiles/default', 'nuggetengage-demo3' => 'http://api.talis.com/stores/nuggetengage-demo3/indexes/metaboxIndex/queryprofiles/default', 'nuggetengage-demo4' => 'http://api.talis.com/stores/nuggetengage-demo4/indexes/metaboxIndex/queryprofiles/default', 'nuggetengage-qa1' => 'http://api.talis.com/stores/nuggetengage-qa1/indexes/metaboxIndex/queryprofiles/default', 'quoll-dev1' => 'http://api.talis.com/stores/quoll-dev1/indexes/default/queryprofiles/default', 'schema-cache' => 'http://api.talis.com/stores/schema-cache/indexes/default/queryprofiles/default', 'silkworm-dev' => 'http://api.talis.com/stores/silkworm-dev/indexes/default/queryprofiles/default', 'silkworm' => 'http://api.talis.com/stores/silkworm/indexes/default/queryprofiles/default', 'source-dev1' => 'http://api.talis.com/stores/source-dev1/indexes/default/queryprofiles/default', 'source-qa1' => 'http://api.talis.com/stores/source-qa1/indexes/default/queryprofiles/default', 'tomh-dev1' => 'http://api.talis.com/stores/tomh-dev1/indexes/default/queryprofiles/default', 'ukbib' => 'http://api.talis.com/stores/ukbib/indexes/m21Advanced/queryprofiles/default', 'union' => 'http://api.talis.com/stores/union/indexes/union/queryprofiles/default', 'wikipedia' => 'http://api.talis.com/stores/wikipedia/indexes/abstracts/queryprofiles/default', 'zephyr-cust10' => 'http://api.talis.com/stores/zephyr-cust10/indexes/metaboxIndex/queryprofiles/default', 'zephyr-cust11' => 'http://api.talis.com/stores/zephyr-cust11/indexes/metaboxIndex/queryprofiles/default', 'zephyr-cust12' => 'http://api.talis.com/stores/zephyr-cust12/indexes/metaboxIndex/queryprofiles/default', 'zephyr-cust13' => 'http://api.talis.com/stores/zephyr-cust13/indexes/metaboxIndex/queryprofiles/default', 'zephyr-cust14' => 'http://api.talis.com/stores/zephyr-cust14/indexes/metaboxIndex/queryprofiles/default', 'zephyr-cust15' => 'http://api.talis.com/stores/zephyr-cust15/indexes/metaboxIndex/queryprofiles/default', 'zephyr-cust16' => 'http://api.talis.com/stores/zephyr-cust16/indexes/metaboxIndex/queryprofiles/default', 'zephyr-cust17' => 'http://api.talis.com/stores/zephyr-cust17/indexes/metaboxIndex/queryprofiles/default', 'zephyr-cust18' => 'http://api.talis.com/stores/zephyr-cust18/indexes/metaboxIndex/queryprofiles/default', 'zephyr-cust19' => 'http://api.talis.com/stores/zephyr-cust19/indexes/metaboxIndex/queryprofiles/default', 'zephyr-cust1' => 'http://api.talis.com/stores/zephyr-cust1/indexes/metaboxIndex/queryprofiles/default', 'zephyr-cust2' => 'http://api.talis.com/stores/zephyr-cust2/indexes/metaboxIndex/queryprofiles/default', 'zephyr-cust3' => 'http://api.talis.com/stores/zephyr-cust3/indexes/metaboxIndex/queryprofiles/default', 'zephyr-cust4' => 'http://api.talis.com/stores/zephyr-cust4/indexes/metaboxIndex/queryprofiles/default', 'zephyr-cust5' => 'http://api.talis.com/stores/zephyr-cust5/indexes/metaboxIndex/queryprofiles/default', 'zephyr-cust6' => 'http://api.talis.com/stores/zephyr-cust6/indexes/metaboxIndex/queryprofiles/default', 'zephyr-cust7' => 'http://api.talis.com/stores/zephyr-cust7/indexes/metaboxIndex/queryprofiles/default', 'zephyr-cust8' => 'http://api.talis.com/stores/zephyr-cust8/indexes/metaboxIndex/queryprofiles/default', 'zephyr-cust9' => 'http://api.talis.com/stores/zephyr-cust9/indexes/metaboxIndex/queryprofiles/default');
     foreach ($qp_uris as $store_name => $qp_uri) {
         $config = new Config("http://api.talis.com/stores/{$store_name}/config");
         $this->assertEquals($qp_uri, $config->get_first_query_profile_uri());
     }
 }