Ryan10145 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/401833 )

Change subject: Added Tests for ListToggle
......................................................................

Added Tests for ListToggle

Bug: T183898
Change-Id: I1c6cd8ea21127db56701cc6073fa880b2180d846
---
A tests/phpunit/includes/ListToggleTest.php
1 file changed, 31 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/33/401833/1

diff --git a/tests/phpunit/includes/ListToggleTest.php 
b/tests/phpunit/includes/ListToggleTest.php
new file mode 100644
index 0000000..92e0907
--- /dev/null
+++ b/tests/phpunit/includes/ListToggleTest.php
@@ -0,0 +1,31 @@
+<?php
+
+/**
+ * @covers ListToggle
+ */
+class ListToggleTest extends MediaWikiTestCase {
+
+       /**
+        * @covers ListToggle::__construct
+        */
+       public function testConstruct() {
+               $specialpage = new SpecialPage( 'TestPage' );
+               $output = $specialpage->getOutput();
+               $listToggle = new ListToggle( $output );
+
+               $this->assertInstanceOf('ListToggle', $listToggle);
+       }
+
+       /**
+        * @covers ListToggle::getHTML
+        */
+       public function testGetHTML() {
+               $specialpage = new SpecialPage( 'TestPage' );
+               $output = $specialpage->getOutput();
+               $listToggle = new ListToggle( $output );
+
+               $html = $listToggle->getHTML();
+               $this->assertRegExp('/<div 
class="mw-checkbox-toggle-controls">/',
+                       $html);
+       }
+}
\ No newline at end of file

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1c6cd8ea21127db56701cc6073fa880b2180d846
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Ryan10145 <chang.ryan10...@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to