| 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 |
|