-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'client_factory' into develop
- Loading branch information
Showing
1 changed file
with
23 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?php | ||
/** | ||
* @package Plausible Analytics Integration Tests - Helpers | ||
*/ | ||
|
||
namespace Plausible\Analytics\Tests\Integration; | ||
|
||
use Plausible\Analytics\Tests\TestCase; | ||
use Plausible\Analytics\WP\Filters; | ||
|
||
class FiltersTest extends TestCase { | ||
/** | ||
* @see Filters::add_plausible_attributes() | ||
*/ | ||
public function testAddPlausibleAttributes() { | ||
$class = new Filters(); | ||
$tag = $class->add_plausible_attributes( '<script id="plausible-analytics-js" src="test.js">', 'plausible-analytics' ); | ||
|
||
$this->assertStringContainsString( 'example.org', $tag ); | ||
$this->assertStringContainsString( 'plausible.io/api/event', $tag ); | ||
$this->assertStringNotContainsString( 'plausible-analytics-js', $tag ); | ||
} | ||
} |