DavisNT has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/186820

Change subject: Add basic tests
......................................................................

Add basic tests

Minor adjustments

Change-Id: Iafeeae52501c852aef69acdbabb7f84d2419137f
---
M tests/GoogleAnalyticsHooksTest.php
1 file changed, 3 insertions(+), 5 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/googleAnalytics 
refs/changes/20/186820/1

diff --git a/tests/GoogleAnalyticsHooksTest.php 
b/tests/GoogleAnalyticsHooksTest.php
index a3c1886..9a361ca 100644
--- a/tests/GoogleAnalyticsHooksTest.php
+++ b/tests/GoogleAnalyticsHooksTest.php
@@ -62,6 +62,9 @@
                $this->setMwGlobals( 'wgGoogleAnalyticsAccount', '' );
                GoogleAnalyticsHooks::onSkinAfterBottomScripts( 
$this->mockSkin( false ), $text );
                $this->assertContains( 'No web analytics configured', $text );
+               $this->setMwGlobals( 'wgGoogleAnalyticsOtherCode', 
'analytics.example.com/foo.js' );
+               GoogleAnalyticsHooks::onSkinAfterBottomScripts( 
$this->mockSkin( false ), $text );
+               $this->assertContains( 'analytics.example.com/foo.js', $text );
        }
 
        /**
@@ -69,11 +72,6 @@
         */
        public function testExcludedPages( $type, $conf, $title, $include ) {
                $this->setMwGlobals( $type, array( $conf ) );
-               /*if ( $type == 'special' ) {
-                       $this->setMwGlobals( 'wgGoogleAnalyticsIgnoreSpecials', 
array( $title ) );
-               } elseif ( $type == 'nsid' ) {
-                       $this->setMwGlobals( '$wgGoogleAnalyticsIgnoreNsIDs', 
arr)
-               }*/
                $text = '';
                GoogleAnalyticsHooks::onSkinAfterBottomScripts( 
$this->mockSkin( false, $title ), $text );
                if ( $include ) {

-- 
To view, visit https://gerrit.wikimedia.org/r/186820
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iafeeae52501c852aef69acdbabb7f84d2419137f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/googleAnalytics
Gerrit-Branch: master
Gerrit-Owner: DavisNT <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to