PluginProbe
Cookiebot by Usercentrics – Automatic Cookie Banner for GDPR/CCPA & Google Consent Mode / 4.7.3
Cookiebot by Usercentrics – Automatic Cookie Banner for GDPR/CCPA & Google Consent Mode v4.7.3
4.7.3 4.7.2 4.7.1 trunk 2.3.0 2.4.0 2.4.1 2.4.2 2.5.0 3.0.0 3.0.1 3.1.0 3.10.0 3.10.1 3.11.1 3.11.2 3.11.3 3.2.0 3.3.0 3.3.1 3.4.0 3.4.1 3.4.2 3.5.0 3.6.0 All 93 releases
cookiebot / tests / unit / Test_Helper.php

Test_Helper.php in Cookiebot by Usercentrics – Automatic Cookie Banner for GDPR/CCPA & Google Consent Mode 4.7.3, at tests/unit/Test_Helper.php

33 lines 890 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace cybot\cookiebot\tests\unit;
4
5 use function cybot\cookiebot\lib\cookiebot_assist;
6
7 class Test_Helper extends \WP_UnitTestCase {
8
9 public function test_cookiebot_assist_with_an_array_parameter() {
10 $output = cookiebot_assist( array( 'statistics' ) );
11
12 $this->assertEquals( ' type="text/plain" data-cookieconsent="statistics"', $output );
13 }
14
15 public function test_cookiebot_assist_with_a_string_parameter() {
16 $output = cookiebot_assist( 'statistics' );
17
18 $this->assertEquals( ' type="text/plain" data-cookieconsent="statistics"', $output );
19 }
20
21 public function test_cookiebot_assist_with_no_parameter() {
22 $output = cookiebot_assist();
23
24 $this->assertEquals( ' type="text/plain" data-cookieconsent="statistics"', $output );
25 }
26
27 public function test_cookiebot_assist_with_empty_parameter() {
28 $output = cookiebot_assist( '' );
29
30 $this->assertEmpty( $output );
31 }
32 }
33