| 1 |
<?php |
| 2 |
|
| 3 |
namespace cybot\cookiebot\tests\integration\addons; |
| 4 |
|
| 5 |
use cybot\cookiebot\addons\controller\addons\add_to_any\Add_To_Any; |
| 6 |
use PHPUnit\Framework\ExpectationFailedException; |
| 7 |
use SebastianBergmann\RecursionContext\InvalidArgumentException; |
| 8 |
use WP_UnitTestCase; |
| 9 |
|
| 10 |
class Test_Add_To_Any extends WP_UnitTestCase { |
| 11 |
|
| 12 |
/** |
| 13 |
* @covers \cybot\cookiebot\addons\controller\addons\add_to_any\Add_To_Any |
| 14 |
* @throws ExpectationFailedException|InvalidArgumentException |
| 15 |
* @throws \Exception |
| 16 |
*/ |
| 17 |
public function test_is_plugin_compatible() { |
| 18 |
$content = Add_To_Any::get_svn_file_content(); |
| 19 |
|
| 20 |
// test the content |
| 21 |
$this->assertNotFalse( strpos( $content, "add_action( 'wp_enqueue_scripts', 'A2A_SHARE_SAVE_stylesheet'" ) ); |
| 22 |
$this->assertNotFalse( strpos( $content, "\$script_handle = 'addtoany-core';" ) ); |
| 23 |
$this->assertNotFalse( strpos( $content, 'wp_enqueue_script( $script_handle );' ) ); |
| 24 |
$this->assertNotFalse( strpos( $content, "wp_enqueue_script( 'addtoany-jquery'" ) ); |
| 25 |
} |
| 26 |
} |
| 27 |
|