/** * Initiate the controller and page classes and configure GeoNetwork service * to use the mockup-controller for testing. */ function setUp() { parent::setUp(); $url = Director::absoluteBaseURL() . 'GnPublishMetadataCommandTest_Controller'; $page = $this->objFromFixture('RegisterDataPage', 'registerdatapage'); $page->GeonetworkBaseURL = $url; $this->controller = new CataloguePage_Controller($page); $this->controller->pushCurrent(); //GetRecordsCommand::set_catalogue_url("/getrecords?usetestmanifest=1&flush=1"); GnPublishMetadataCommand::set_api_url('/getrecords?usetestmanifest=1&flush=1'); // check from where the test is executed (important when running the // tests via a CI environment. self::$xsl_path = GnPublishMetadataCommand::get_xsl_path(); if (in_array('cli-script.php', scandir('.'))) { // system is in sapphire directory GnPublishMetadataCommand::set_xsl_path('../geocatalogue/xslt/gnInsertResponse.xsl'); } else { if (in_array('geocatalog', scandir('.'))) { GnPublishMetadataCommand::set_xsl_path('geocatalogue/xslt/gnInsertResponse.xsl'); } } }