Jeroen De Dauw has uploaded a new change for review.

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


Change subject: Added testReturnValueOfGetDirection
......................................................................

Added testReturnValueOfGetDirection

Change-Id: I343e1d5ca850dafa1fc14f0d3ec897743a5c1b78
---
M tests/phpunit/Language/Option/SortExpressionTest.php
1 file changed, 17 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Ask 
refs/changes/37/49937/1

diff --git a/tests/phpunit/Language/Option/SortExpressionTest.php 
b/tests/phpunit/Language/Option/SortExpressionTest.php
index 78ecc89..66a243c 100644
--- a/tests/phpunit/Language/Option/SortExpressionTest.php
+++ b/tests/phpunit/Language/Option/SortExpressionTest.php
@@ -72,4 +72,21 @@
                $this->assertPrimitiveStructure( $array );
        }
 
+       /**
+        * @dataProvider instanceProvider
+        *
+        * @since 0.1
+        *
+        * @param SortExpression $object
+        */
+       public function testReturnValueOfGetDirection( SortExpression 
$expression ) {
+               $direction = $expression->getDirection();
+
+               $this->assertInternalType( 'string', $direction );
+               $this->assertTrue(
+                       in_array( $direction, array( SortExpression::ASCENDING, 
SortExpression::DESCENDING ) ),
+                       'Sort direction is one of the known values'
+               );
+       }
+
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I343e1d5ca850dafa1fc14f0d3ec897743a5c1b78
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Ask
Gerrit-Branch: master
Gerrit-Owner: Jeroen De Dauw <jeroended...@gmail.com>

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

Reply via email to