2424namespace Wikimedia \IEGReview ;
2525
2626/**
27+ * @coversDefaultClass \Wikimedia\IEGReview\Form
28+ * @uses \Wikimedia\IEGReview\Form
2729 * @author Bryan Davis <bd808@wikimedia.org>
2830 * @copyright © 2014 Bryan Davis, Wikimedia Foundation and contributors.
2931 */
3032class FormTest extends \PHPUnit_Framework_TestCase {
3133
32- /**
33- * @covers Form
34- */
3534 public function testRequired () {
3635 $ form = new Form ();
3736 $ form ->expectString ( 'foo ' , array ( 'required ' => true ) );
@@ -43,9 +42,6 @@ public function testRequired () {
4342 $ this ->assertContains ( 'foo ' , $ form ->getErrors () );
4443 }
4544
46- /**
47- * @covers Form
48- */
4945 public function testDefaultWhenEmpty () {
5046 $ form = new Form ();
5147 $ form ->expectString ( 'foo ' , array ( 'default ' => 'bar ' ) );
@@ -57,9 +53,6 @@ public function testDefaultWhenEmpty () {
5753 $ this ->assertNotContains ( 'foo ' , $ form ->getErrors () );
5854 }
5955
60- /**
61- * @covers Form
62- */
6356 public function testNotInArray () {
6457 $ form = new Form ();
6558 $ form ->expectInArray ( 'foo ' , array ( 'bar ' ), array ( 'required ' => true ) );
@@ -71,9 +64,6 @@ public function testNotInArray () {
7164 $ this ->assertContains ( 'foo ' , $ form ->getErrors () );
7265 }
7366
74- /**
75- * @covers Form
76- */
7767 public function testInArray () {
7868 $ _POST ['foo ' ] = 'bar ' ;
7969 $ form = new Form ();
@@ -86,9 +76,6 @@ public function testInArray () {
8676 $ this ->assertNotContains ( 'foo ' , $ form ->getErrors () );
8777 }
8878
89- /**
90- * @covers Form
91- */
9279 public function testNotInArrayNotRequired () {
9380 unset( $ _POST ['foo ' ] );
9481 $ form = new Form ();
@@ -101,9 +88,6 @@ public function testNotInArrayNotRequired () {
10188 $ this ->assertNotContains ( 'foo ' , $ form ->getErrors () );
10289 }
10390
104- /**
105- * @covers Form
106- */
10791 public function testEncodeBasic () {
10892 $ input = array (
10993 'foo ' => 1 ,
@@ -114,9 +98,6 @@ public function testEncodeBasic () {
11498 $ this ->assertEquals ( 'foo=1&bar=this%3Dthat&baz=tom+%26+jerry ' , $ output );
11599 }
116100
117- /**
118- * @covers Form
119- */
120101 public function testEncodeArray () {
121102 $ input = array (
122103 'foo ' => array ( 'a ' , 'b ' , 'c ' ),
@@ -127,9 +108,6 @@ public function testEncodeArray () {
127108 'foo=a&foo=b&foo=c&bar%5B%5D=1&bar%5B%5D=2&bar%5B%5D=3 ' , $ output );
128109 }
129110
130- /**
131- * @covers Form
132- */
133111 public function testQsMerge () {
134112 $ _GET ['foo ' ] = 1 ;
135113 $ _GET ['bar ' ] = 'this=that ' ;
@@ -142,9 +120,6 @@ public function testQsMerge () {
142120 $ this ->assertEquals ( 'foo=2&bar=this%3Dthat&baz=tom+%26+jerry&xyzzy=grue ' , $ output );
143121 }
144122
145- /**
146- * @covers Form
147- */
148123 public function testQsRemove () {
149124 $ _GET ['foo ' ] = 1 ;
150125 $ _GET ['bar ' ] = 'this=that ' ;
@@ -156,5 +131,4 @@ public function testQsRemove () {
156131 $ output = Form::qsRemove ( array ( 'bar ' ) );
157132 $ this ->assertEquals ( 'foo=1&baz=tom+%26+jerry ' , $ output );
158133 }
159-
160- } //end FormTest
134+ }
0 commit comments