| 1 |
<?php |
| 2 |
|
| 3 |
namespace cybot\cookiebot\tests\integration\addons; |
| 4 |
|
| 5 |
use cybot\cookiebot\addons\controller\addons\custom_facebook_feed\Custom_Facebook_Feed; |
| 6 |
use PHPUnit\Framework\ExpectationFailedException; |
| 7 |
use SebastianBergmann\RecursionContext\InvalidArgumentException; |
| 8 |
use WP_UnitTestCase; |
| 9 |
|
| 10 |
class Test_Custom_Facebook_Feed extends WP_UnitTestCase { |
| 11 |
|
| 12 |
/** |
| 13 |
* @covers \cybot\cookiebot\addons\controller\addons\custom_facebook_feed\Custom_Facebook_Feed |
| 14 |
* @throws ExpectationFailedException |
| 15 |
* @throws InvalidArgumentException |
| 16 |
* @throws \Exception |
| 17 |
*/ |
| 18 |
public function test_is_plugin_compatible() { |
| 19 |
$content = Custom_Facebook_Feed::get_svn_file_content( 'inc/Custom_Facebook_Feed.php' ); |
| 20 |
|
| 21 |
$this->assertNotFalse( strpos( $content, 'echo \'var cfflinkhashtags = "\' . $cff_link_hashtags . \'";\';' ) ); |
| 22 |
$this->assertNotFalse( strpos( $content, 'wp_enqueue_script(\'cffscripts\');' ) ); |
| 23 |
$this->assertNotFalse( strpos( $content, 'add_action(\'wp_footer\', [ self::$instance, \'cff_js\' ]);' ) ); |
| 24 |
} |
| 25 |
} |
| 26 |
|