Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/CustomJsTracker/tests/System/PiwikJsContentTest.php')
-rw-r--r--plugins/CustomJsTracker/tests/System/PiwikJsContentTest.php39
1 files changed, 39 insertions, 0 deletions
diff --git a/plugins/CustomJsTracker/tests/System/PiwikJsContentTest.php b/plugins/CustomJsTracker/tests/System/PiwikJsContentTest.php
new file mode 100644
index 0000000000..300c312984
--- /dev/null
+++ b/plugins/CustomJsTracker/tests/System/PiwikJsContentTest.php
@@ -0,0 +1,39 @@
+<?php
+/**
+ * Piwik - free/libre analytics platform
+ *
+ * @link https://matomo.org
+ * @license http://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 test_piwikJsAndPiwikMinJsMustHaveSameContent()
+ {
+ $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 test_piwikJsContainsHook()
+ {
+ $piwikMin = PIWIK_DOCUMENT_ROOT . '/js/piwik.min.js';
+ $content = file_get_contents($piwikMin);
+
+ $this->assertContains(PiwikJsManipulator::HOOK, $content);
+ }
+
+} \ No newline at end of file