| 1 |
<?php |
| 2 |
|
| 3 |
namespace cookiebot_addons\tests\integration\addons; |
| 4 |
|
| 5 |
class Test_Google_Analytics_Async extends \WP_UnitTestCase { |
| 6 |
|
| 7 |
public function setUp() { |
| 8 |
|
| 9 |
} |
| 10 |
|
| 11 |
/** |
| 12 |
* This will validate if the hook for "google_analytics_async" still exists |
| 13 |
* |
| 14 |
* @since 2.1.0 |
| 15 |
*/ |
| 16 |
public function test_hooks() { |
| 17 |
$file = WP_PLUGIN_DIR . '/google-analytics-async/google-analytics-async.php'; |
| 18 |
|
| 19 |
if( file_exists( $file ) ) { |
| 20 |
$content = file_get_contents( $file ); |
| 21 |
|
| 22 |
$this->assertNotFalse( strpos( $content, 'add_action( \'wp_head\', array( &$this, \'tracking_code_output\' ) );') ); |
| 23 |
} |
| 24 |
} |
| 25 |
} |