skip test if not web server available

This commit is contained in:
weryques 2018-06-06 09:20:21 -03:00
parent 2a59bf0cb0
commit 85d32e1a4a
1 changed files with 11 additions and 0 deletions

View File

@ -191,6 +191,11 @@ class ImporterTests extends TAINACAN_UnitTestCase {
$_SESSION['tainacan_importer'][$id]->set_file( $file_name );
if(!isset( $_SESSION['tainacan_importer'][$id]->tmp_file )){
#TODO: Remove dependence of web server (see fetch_from_remote)
$this->markTestSkipped('This test need a apache installation available.');
}
// file isset on importer
$this->assertTrue( isset( $_SESSION['tainacan_importer'][$id]->tmp_file ) );
@ -250,6 +255,12 @@ class ImporterTests extends TAINACAN_UnitTestCase {
$csv_importer = new Importer\CSV();
$id = $csv_importer->get_id();
$_SESSION['tainacan_importer'][$id]->fetch_from_remote( 'http://localhost/wordpress-test/wp-json' );
if(!isset( $_SESSION['tainacan_importer'][$id]->tmp_file )){
#TODO: Remove dependence of web server (see fetch_from_remote)
$this->markTestSkipped('This test need a apache installation available.');
}
$this->assertTrue( isset( $_SESSION['tainacan_importer'][$id]->tmp_file ) );
}
}