PluginProbe
Cookiebot by Usercentrics – Automatic Cookie Banner for GDPR/CCPA & Google Consent Mode / 4.7.5
Cookiebot by Usercentrics – Automatic Cookie Banner for GDPR/CCPA & Google Consent Mode v4.7.5
4.7.4 4.7.5 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 All 95 releases
cookiebot / tests / integration / addons / Test_Jetpack_Widgets.php

Test_Jetpack_Widgets.php in Cookiebot by Usercentrics – Automatic Cookie Banner for GDPR/CCPA & Google Consent Mode 4.7.5, at tests/integration/addons/Test_Jetpack_Widgets.php

74 lines 2.3 KB
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\integration\addons;
4
5 use cybot\cookiebot\addons\controller\addons\jetpack\Jetpack;
6 use PHPUnit\Framework\ExpectationFailedException;
7 use SebastianBergmann\RecursionContext\InvalidArgumentException;
8 use WP_UnitTestCase;
9
10 class Test_Jetpack_Widgets extends WP_UnitTestCase {
11
12 /**
13 * @covers \cybot\cookiebot\addons\controller\addons\jetpack\widget\Facebook_Jetpack_Widget
14 * @throws ExpectationFailedException
15 * @throws InvalidArgumentException
16 * @throws \Exception
17 */
18 public function test_facebook_jetpack_widget() {
19 $content = Jetpack::get_svn_file_content( 'class.jetpack.php' );
20
21 $this->assertNotFalse(
22 strpos(
23 $content,
24 'wp_register_script(
25 \'jetpack-facebook-embed\''
26 )
27 );
28 }
29
30 /**
31 * @covers \cybot\cookiebot\addons\controller\addons\jetpack\widget\Goodreads_Jetpack_Widget
32 * @throws ExpectationFailedException
33 * @throws InvalidArgumentException
34 * @throws \Exception
35 */
36 public function test_goodreads_jetpack_widget() {
37 $content = Jetpack::get_svn_file_content( 'modules/widgets/goodreads.php' );
38
39 $this->assertNotFalse(
40 strpos(
41 $content,
42 'parent::__construct(
43 \'wpcom-goodreads\''
44 )
45 );
46 }
47
48 /**
49 * @covers \cybot\cookiebot\addons\controller\addons\jetpack\widget\Google_Maps_Jetpack_Widget
50 * @throws ExpectationFailedException
51 * @throws InvalidArgumentException
52 * @throws \Exception
53 */
54 public function test_google_maps_jetpack_widget() {
55 $content = Jetpack::get_svn_file_content( 'modules/widgets/contact-info.php' );
56
57 $this->assertNotFalse( strpos( $content, 'do_action( \'jetpack_contact_info_widget_start\' );' ) );
58 $this->assertNotFalse( strpos( $content, 'do_action( \'jetpack_contact_info_widget_end\' );' ) );
59 $this->assertNotFalse( strpos( $content, 'do_action( \'jetpack_stats_extra\', \'widget_view\', \'contact_info\' );' ) );
60 }
61
62 /**
63 * @covers \cybot\cookiebot\addons\controller\addons\jetpack\widget\Twitter_Timeline_Jetpack_Widget
64 * @throws ExpectationFailedException
65 * @throws InvalidArgumentException
66 * @throws \Exception
67 */
68 public function test_twitter_timeline_jetpack_widget() {
69 $content = Jetpack::get_svn_file_content( 'modules/widgets/twitter-timeline.php' );
70
71 $this->assertNotFalse( strpos( $content, 'wp_enqueue_script( \'jetpack-twitter-timeline\' );' ) );
72 }
73 }
74