Skip to content

Commit

Permalink
Merge branch 'client_factory' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan0sz committed Jul 17, 2024
2 parents 94c76d6 + 032808a commit 1bd0802
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions tests/integration/FiltersTest.php
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 );
}
}

0 comments on commit 1bd0802

Please sign in to comment.