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: FFLinkedInTest.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 FFLinkedInTest extends PHPUnit\Framework\TestCase {
[11] Fix | Delete
private $context;
[12] Fix | Delete
[13] Fix | Delete
function test_status_update(){
[14] Fix | Delete
$linkedIn = new flow\social\FFLinkedIn();
[15] Fix | Delete
self::assertNotNull($linkedIn);
[16] Fix | Delete
[17] Fix | Delete
$feed = new stdClass();
[18] Fix | Delete
$feed->content = '3642979';
[19] Fix | Delete
$feed->{'event-type'} = 'status-update';
[20] Fix | Delete
$feed->id = 'yd85219';
[21] Fix | Delete
$feed->type = 'linkedIn';
[22] Fix | Delete
$feed->{'filter-by-words'} = '';
[23] Fix | Delete
$feed->last_update = 'N/A';
[24] Fix | Delete
$feed->use_curl_follow_location = true;
[25] Fix | Delete
$feed->use_ipv4 = true;
[26] Fix | Delete
$feed->linkedin_access_token = '123';
[27] Fix | Delete
[28] Fix | Delete
$is_empty_feed = true;
[29] Fix | Delete
[30] Fix | Delete
$linkedIn->init($this->context, $feed);
[31] Fix | Delete
$posts = $linkedIn->posts($is_empty_feed);
[32] Fix | Delete
$this->assertTrue(is_array($posts));
[33] Fix | Delete
[34] Fix | Delete
//
[35] Fix | Delete
// $context = ff_get_context();
[36] Fix | Delete
// $stream = new flow\settings\FFStreamSettings($feed);
[37] Fix | Delete
// $options = new flow\settings\FFGeneralSettings(
[38] Fix | Delete
// array(
[39] Fix | Delete
// 'linkedin_access_token' => 'AQWN_y3_PQ0p5yNu0y3GckVx4BfHln1G1MHQfPMxV53yvzUU5GhOFeL38l0MEiBNvMey9Te3k_l3EoJBGcf-AuG3ZopmLxmAZFY9hFZyBmbnppUBlelopurLBDu_gJ5UtcuaG7IJSmGn3l_hO1mjH5P7Drx0kxqkzwFWJuEemVPu2Q23l0U',
[40] Fix | Delete
// 'general-settings-disable-proxy-server' => true
[41] Fix | Delete
// ), []);
[42] Fix | Delete
//
[43] Fix | Delete
// $linkedIn->init($context, $options, $stream, $feed);
[44] Fix | Delete
// var_dump($linkedIn->posts());
[45] Fix | Delete
// var_dump($linkedIn->errors());
[46] Fix | Delete
// foreach($linkedIn->errors() as $item){
[47] Fix | Delete
// $this->assertTrue(is_array($item));
[48] Fix | Delete
// echo '---';
[49] Fix | Delete
// var_dump($item);
[50] Fix | Delete
// }
[51] Fix | Delete
[52] Fix | Delete
[53] Fix | Delete
[54] Fix | Delete
// $feed = (new class() extends \flow\social\FFLinkedIn {
[55] Fix | Delete
// public function __construct() {
[56] Fix | Delete
// parent::__construct(null);
[57] Fix | Delete
// }
[58] Fix | Delete
// });
[59] Fix | Delete
// $data = file_get_contents('test-social-linkedin.response.json');
[60] Fix | Delete
// $posts = $feed->posts();
[61] Fix | Delete
}
[62] Fix | Delete
[63] Fix | Delete
function setUp() {
[64] Fix | Delete
parent::setUp();
[65] Fix | Delete
[66] Fix | Delete
$this->context = [];
[67] Fix | Delete
$this->context['image_size_cache'] = new \flow\social\cache\FFImageSizeCacheBase();
[68] Fix | Delete
$this->context['plugin_url'] = '';
[69] Fix | Delete
$this->context['slug'] = 'flow-flow';
[70] Fix | Delete
}
[71] Fix | Delete
}
[72] Fix | Delete
[73] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function