# cookiebot/4.7.5/tests/integration/addons/Test_Ga_Google_Analytics.php

Cookiebot by Usercentrics – Automatic Cookie Banner for GDPR/CCPA &amp; Google Consent Mode, version 4.7.5. 26 lines.

- Page: https://pluginprobe.com/plugins/cookiebot/4.7.5/code/tests/integration/addons/Test_Ga_Google_Analytics.php
- Raw: https://pluginprobe.com/plugins/cookiebot/4.7.5/raw/tests/integration/addons/Test_Ga_Google_Analytics.php
- Modified: 2025-03-27T15:58:12+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/cookiebot/4.7.5/code/tests/integration/addons/Test_Ga_Google_Analytics.php#L10-L20`.

```php
<?php

namespace cybot\cookiebot\tests\integration\addons;

use cybot\cookiebot\addons\controller\addons\ga_google_analytics\Ga_Google_Analytics;
use PHPUnit\Framework\ExpectationFailedException;
use SebastianBergmann\RecursionContext\InvalidArgumentException;
use WP_UnitTestCase;

class Test_Ga_Google_Analytics extends WP_UnitTestCase {

	/**
	 * @covers \cybot\cookiebot\addons\controller\addons\ga_google_analytics\Ga_Google_Analytics
	 * @throws ExpectationFailedException
	 * @throws InvalidArgumentException
	 * @throws \Exception
	 */
	public function test_is_plugin_compatible() {
		$content = Ga_Google_Analytics::get_svn_file_content( 'inc/plugin-core.php' );

		$this->assertNotFalse( strpos( $content, 'ga_google_analytics_tracking_code' ) );
		$this->assertNotFalse( strpos( $content, 'add_action(\'wp_head\', $function);' ) );
		$this->assertNotFalse( strpos( $content, 'add_action(\'wp_footer\', $function);' ) );
	}
}

```
