function test_display_retrieved_content() { require __DIR__ . '/../src/Consumer.php'; // arrange $url = 'www.zaziork.com'; $path = 'wp-json/posts'; $proto = 'https'; // act $result = \ZwsApiConsumer\Consumer::display_retrieved_content($url, $path, $proto); // assert $this->assertNotEquals($result, ''); }
public static function create_shortcode($atts) { require_once __DIR__ . '/filters.php'; require_once __DIR__ . '/Consumer.php'; // let's sanitize and filter the incoming attributes before we play with them if (!empty($atts)) { $sanitized_atts = self::filter_shortcodes($atts); } $a = shortcode_atts(array('url' => get_site_option(self::$plugin_options_name)['zws_api_consumer_api_base_url'], 'path' => get_site_option(self::$plugin_options_name)['zws_api_consumer_api_path'], 'protocol' => get_site_option(self::$plugin_options_name)['zws_api_consumer_proto']), $sanitized_atts); return \ZwsApiConsumer\Consumer::display_retrieved_content($a['url'], $a['path'], $a['protocol']); }