From 8036b7e8c143b5bfcb3db559af3c1486c991ef8c Mon Sep 17 00:00:00 2001 From: eduardohumberto Date: Thu, 13 Sep 2018 22:37:07 -0300 Subject: [PATCH] test importer - verify connection --- tests/test-importer.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/tests/test-importer.php b/tests/test-importer.php index 1a9a59392..93cde402b 100644 --- a/tests/test-importer.php +++ b/tests/test-importer.php @@ -500,12 +500,17 @@ class ImporterTests extends TAINACAN_UnitTestCase { $this->assertFalse( is_numeric($document_id) ); $attachments = $items[0]->get_attachments(); - $this->assertEquals( 1, count( $attachments ) ); - $this->assertTrue( count($items[2]->get_attachments()) > 0 ); + if(@file_get_contents ( 'https://www.w3schools.com/w3css/img_lights.jpg' )) + $this->assertEquals( 1, count( $attachments ) ); + + if(@file_get_contents ( 'https://www.youtube.com/watch?v=V8dpmD4HG5s&start_radio=1&list=RDEMZS6OrHEAut8dOA38mVtVpg' )) + $this->assertTrue( count($items[2]->get_attachments()) > 0 ); $document_id = $items[2]->get_document(); - $this->assertTrue( is_numeric($document_id) ); + + if(@file_get_contents ( 'https://www.codeproject.com/KB/GDI-plus/ImageProcessing2/img.jpg' )) + $this->assertTrue( is_numeric($document_id) ); $document = $items[3]->get_document(); $this->assertTrue( wp_http_validate_url($document) !== false );