Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93
/home/sportsfe.../httpdocs/wp-conte.../plugins/flow-flo.../libs/flowflow/social/tests/flow/social
File: FFPinterestTest.php
<?php
[0] Fix | Delete
/**
[1] Fix | Delete
* FlowSocial
[2] Fix | Delete
*
[3] Fix | Delete
* @package FlowFlow
[4] Fix | Delete
* @author Looks Awesome <email@looks-awesome.com>
[5] Fix | Delete
*
[6] Fix | Delete
* @link http://looks-awesome.com
[7] Fix | Delete
* @copyright 2014-2018 Looks Awesome
[8] Fix | Delete
*/
[9] Fix | Delete
[10] Fix | Delete
class FFPinterestTest extends PHPUnit\Framework\TestCase {
[11] Fix | Delete
private $context;
[12] Fix | Delete
[13] Fix | Delete
function test_status_update(){
[14] Fix | Delete
$feed = new stdClass();
[15] Fix | Delete
$feed->content = 'elainen';
[16] Fix | Delete
$feed->id = 'yd85219';
[17] Fix | Delete
$feed->type = 'pinterest';
[18] Fix | Delete
$feed->{'filter-by-words'} = '';
[19] Fix | Delete
$feed->{'hide-text'} = false;
[20] Fix | Delete
$feed->last_update = 'N/A';
[21] Fix | Delete
$feed->{'rich-text'} = false;
[22] Fix | Delete
$feed->{'hide-caption'} = false;
[23] Fix | Delete
$feed->use_curl_follow_location = true;
[24] Fix | Delete
$feed->use_ipv4 = true;
[25] Fix | Delete
[26] Fix | Delete
//test first init feed
[27] Fix | Delete
$is_empty_feed = true;
[28] Fix | Delete
[29] Fix | Delete
$pinterest = new flow\social\FFPinterest;
[30] Fix | Delete
$pinterest->init($this->context, $feed);
[31] Fix | Delete
$posts = $pinterest->posts($is_empty_feed);
[32] Fix | Delete
$this->assertTrue(is_array($posts));
[33] Fix | Delete
$this->assertEquals(25, sizeof($posts));
[34] Fix | Delete
foreach ( $posts as $post ) {
[35] Fix | Delete
$this->assertEquals((string)stdClass::class, get_class($post));
[36] Fix | Delete
$this->assertObjectHasAttribute('feed_id', $post);
[37] Fix | Delete
$this->assertTrue(is_string($post->feed_id));
[38] Fix | Delete
$this->assertEquals($feed->id, $post->feed_id);
[39] Fix | Delete
$this->assertObjectHasAttribute('id', $post);
[40] Fix | Delete
$this->assertTrue(is_string($post->id));
[41] Fix | Delete
$this->assertObjectHasAttribute('header', $post);
[42] Fix | Delete
$this->assertTrue(is_string($post->header));
[43] Fix | Delete
$this->assertObjectHasAttribute('type', $post);
[44] Fix | Delete
$this->assertTrue(is_string($post->type));
[45] Fix | Delete
$this->assertEquals('pinterest', $post->type);
[46] Fix | Delete
$this->assertObjectHasAttribute('nickname', $post);
[47] Fix | Delete
$this->assertTrue(is_string($post->nickname));
[48] Fix | Delete
$this->assertObjectHasAttribute('screenname', $post);
[49] Fix | Delete
$this->assertTrue(is_string($post->type));
[50] Fix | Delete
$this->assertObjectHasAttribute('userpic', $post);
[51] Fix | Delete
$this->assertTrue(is_string($post->screenname));
[52] Fix | Delete
$this->assertObjectHasAttribute('system_timestamp', $post);
[53] Fix | Delete
$this->assertTrue(is_string($post->system_timestamp) || is_int($post->system_timestamp));
[54] Fix | Delete
$this->assertObjectHasAttribute('img', $post);
[55] Fix | Delete
$this->assertTrue(is_array($post->img));
[56] Fix | Delete
$this->assertObjectHasAttribute('text', $post);
[57] Fix | Delete
$this->assertTrue(is_string($post->text));
[58] Fix | Delete
$this->assertObjectHasAttribute('userlink', $post);
[59] Fix | Delete
$this->assertTrue(is_string($post->userlink));
[60] Fix | Delete
$this->assertObjectHasAttribute('permalink', $post);
[61] Fix | Delete
$this->assertTrue(is_string($post->permalink));
[62] Fix | Delete
$this->assertObjectHasAttribute('additional', $post);
[63] Fix | Delete
$this->assertTrue(is_array($post->additional));
[64] Fix | Delete
$this->assertObjectHasAttribute('carousel', $post);
[65] Fix | Delete
$this->assertTrue(is_array($post->carousel));
[66] Fix | Delete
$this->assertObjectHasAttribute('media', $post);
[67] Fix | Delete
$this->assertTrue(is_array($post->media));
[68] Fix | Delete
$this->assertObjectHasAttribute('comments', $post);
[69] Fix | Delete
$this->assertTrue(is_array($post->comments));
[70] Fix | Delete
}
[71] Fix | Delete
}
[72] Fix | Delete
[73] Fix | Delete
function setUp() {
[74] Fix | Delete
parent::setUp();
[75] Fix | Delete
[76] Fix | Delete
$this->context = [];
[77] Fix | Delete
$this->context['image_size_cache'] = new \flow\social\cache\FFImageSizeCacheBase();
[78] Fix | Delete
$this->context['plugin_url'] = '';
[79] Fix | Delete
$this->context['slug'] = 'flow-flow';
[80] Fix | Delete
}
[81] Fix | Delete
}
[82] Fix | Delete
[83] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function