| 1 |
<?php |
| 2 |
|
| 3 |
namespace cookiebot_addons\tests\integration\addons; |
| 4 |
|
| 5 |
class Test_Addthis extends \WP_UnitTestCase { |
| 6 |
|
| 7 |
public function setUp() { |
| 8 |
|
| 9 |
} |
| 10 |
|
| 11 |
/** |
| 12 |
* This will validate if the hook "caos_analytics_render_tracking_code" still exists |
| 13 |
* |
| 14 |
*/ |
| 15 |
public function test_addthis() { |
| 16 |
$content = file_get_contents( 'https://plugins.svn.wordpress.org/addthis/trunk/backend/AddThisPlugin.php' ); |
| 17 |
|
| 18 |
$this->assertNotFalse( strpos( $content, "'addthis_widget',") ); |
| 19 |
$this->assertNotFalse( strpos( $content, "window.addthis_product ") ); |
| 20 |
$this->assertNotFalse( strpos( $content, 'add_action(\'wp_enqueue_scripts\', array($this, \'enqueueScripts\'));') ); |
| 21 |
|
| 22 |
} |
| 23 |
} |
| 24 |
|