Merge "Drop outdated "documentation reviewed" tags"
[lhc/web/wiklou.git] / tests / phpunit / includes / api / format / ApiFormatNoneTest.php
index cabd750..1487ad0 100644 (file)
@@ -2,15 +2,33 @@
 
 /**
  * @group API
- * @group Database
- * @group medium
  * @covers ApiFormatNone
  */
 class ApiFormatNoneTest extends ApiFormatTestBase {
 
-       public function testValidSyntax( ) {
-               $data = $this->apiRequest( 'none', array( 'action' => 'query', 'meta' => 'siteinfo' ) );
+       protected $printerName = 'none';
 
-               $this->assertEquals( '', $data ); // No output!
+       public static function provideGeneralEncoding() {
+               return array(
+                       // Basic types
+                       array( array( null ), '' ),
+                       array( array( true ), '' ),
+                       array( array( false ), '' ),
+                       array( array( 42 ), '' ),
+                       array( array( 42.5 ), '' ),
+                       array( array( 1e42 ), '' ),
+                       array( array( 'foo' ), '' ),
+                       array( array( 'fóo' ), '' ),
+
+                       // Arrays and objects
+                       array( array( array() ), '' ),
+                       array( array( array( 1 ) ), '' ),
+                       array( array( array( 'x' => 1 ) ), '' ),
+                       array( array( array( 2 => 1 ) ), '' ),
+
+                       // Content
+                       array( array( '*' => 'foo' ), '' ),
+               );
        }
+
 }