Test_Add_To_Any.php
1 year ago
Test_Addthis.php
1 year ago
Test_CAOS_Host_Analyticsjs_Local_Version_1_97.php
1 year ago
Test_Caos_Host_Analyticsjs_Local.php
1 year ago
Test_Custom_Facebook_Feed.php
4 months ago
Test_Custom_Facebook_Feed_Version_2_17_1.php
1 year ago
Test_Enhanced_Ecommerce_For_Woocommerce_Store.php
1 year ago
Test_Facebook_For_Woocommerce.php
1 year ago
Test_Ga_Google_Analytics.php
1 year ago
Test_Gadwp.php
1 year ago
Test_Google_Analyticator.php
1 year ago
Test_Google_Analytics.php
1 year ago
Test_Google_Site_Kit.php
10 months ago
Test_Hubspot_Leadin.php
1 year ago
Test_Hubspot_Tracking_Code.php
1 year ago
Test_Instagram_Feed.php
4 months ago
Test_Jetpack_Widgets.php
1 year ago
Test_Lightspeed_Cache.php
1 year ago
Test_Ninja_Forms.php
1 year ago
Test_Official_Facebook_Pixel.php
4 months ago
Test_Optinmonster.php
1 year ago
Test_Pixel_Caffeine.php
1 year ago
Test_Simple_Share_Buttons_Adder.php
1 year ago
Test_Wd_Google_Analytics.php
1 year ago
Test_Wp_Analytify.php
1 year ago
Test_Wp_Google_Analytics_Events.php
1 year ago
Test_Wp_Piwik.php
1 year ago
Test_Wp_Seopress.php
4 months ago
Test_Jetpack_Widgets.php
74 lines
| 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 |