| 1 |
<?php |
| 2 |
|
| 3 |
namespace cybot\cookiebot\tests\integration\addons; |
| 4 |
|
| 5 |
use cybot\cookiebot\addons\controller\addons\facebook_for_woocommerce\Facebook_For_Woocommerce; |
| 6 |
use PHPUnit\Framework\ExpectationFailedException; |
| 7 |
use SebastianBergmann\RecursionContext\InvalidArgumentException; |
| 8 |
use WP_UnitTestCase; |
| 9 |
|
| 10 |
class Test_Facebook_For_Woocommerce extends WP_UnitTestCase { |
| 11 |
|
| 12 |
/** |
| 13 |
* @covers \cybot\cookiebot\addons\controller\addons\facebook_for_woocommerce\Facebook_For_Woocommerce |
| 14 |
* @throws ExpectationFailedException |
| 15 |
* @throws InvalidArgumentException |
| 16 |
* @throws \Exception |
| 17 |
*/ |
| 18 |
public function test_facebook_for_woocommerce_main_file() { |
| 19 |
$content = Facebook_For_Woocommerce::get_svn_file_content(); |
| 20 |
|
| 21 |
$this->assertNotFalse( strpos( $content, 'WC_Facebookcommerce' ) ); |
| 22 |
} |
| 23 |
|
| 24 |
/** |
| 25 |
* @covers \cybot\cookiebot\addons\controller\addons\facebook_for_woocommerce\Facebook_For_Woocommerce |
| 26 |
* @throws ExpectationFailedException |
| 27 |
* @throws InvalidArgumentException |
| 28 |
* @throws \Exception |
| 29 |
*/ |
| 30 |
public function test_facebook_for_woocommerce_hooks() { |
| 31 |
$content = Facebook_For_Woocommerce::get_svn_file_content( 'facebook-commerce-pixel-event.php' ); |
| 32 |
|
| 33 |
$this->assertNotFalse( strpos( $content, 'apply_filters( \'wc_facebook_pixel_script_attributes\',' ) ); |
| 34 |
} |
| 35 |
} |
| 36 |
|