Download plugins/CustomJsTracker/tests/System/PiwikJsContentTest.php from Leon4gr45/matomo: direct link, hf CLI and curl.
- Browser
- Download file 1.11 kB
-
https://huggingface.co/spaces/Leon4gr45/matomo/resolve/main/plugins/CustomJsTracker/tests/System/PiwikJsContentTest.php
- Command line
-
hf download hf://spaces/Leon4gr45/matomo/plugins/CustomJsTracker/tests/System/PiwikJsContentTest.php
-
curl -L -o PiwikJsContentTest.php https://huggingface.co/spaces/Leon4gr45/matomo/resolve/main/plugins/CustomJsTracker/tests/System/PiwikJsContentTest.php
1.11 kB
| /** | |
| * Matomo - free/libre analytics platform | |
| * | |
| * @link https://matomo.org | |
| * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later | |
| */ | |
| namespace Piwik\Plugins\CustomJsTracker\tests\System; | |
| use Piwik\Plugins\CustomJsTracker\TrackerUpdater; | |
| use Piwik\Plugins\CustomJsTracker\TrackingCode\PiwikJsManipulator; | |
| use Piwik\Tests\Framework\TestCase\SystemTestCase; | |
| /** | |
| * @group CustomJsTracker | |
| * @group PiwikJsContentTest | |
| * @group PiwikJsContent | |
| * @group Plugins | |
| */ | |
| class PiwikJsContentTest extends SystemTestCase | |
| { | |
| public function testPiwikJsAndPiwikMinJsMustHaveSameContent() | |
| { | |
| $piwikMin = PIWIK_DOCUMENT_ROOT . TrackerUpdater::ORIGINAL_PIWIK_JS; | |
| $piwikJs = PIWIK_DOCUMENT_ROOT . TrackerUpdater::TARGET_MATOMO_JS; | |
| $this->assertSame(file_get_contents($piwikMin), file_get_contents($piwikJs)); | |
| } | |
| public function testPiwikJsContainsHook() | |
| { | |
| $piwikMin = PIWIK_DOCUMENT_ROOT . '/js/piwik.min.js'; | |
| $content = file_get_contents($piwikMin); | |
| self::assertStringContainsString(PiwikJsManipulator::HOOK, $content); | |
| } | |
| } | |