jenkins-bot has submitted this change and it was merged.

Change subject: Add 'Has improper value for' test which not causes an exception
......................................................................


Add 'Has improper value for' test which not causes an exception

'Has improper value for' is language dep. therefore use
$diPropertyError = new \SMWDIProperty( \SMWDIProperty::TYPE_ERROR );
$diPropertyError->getLabel() for the right property label output.

Change-Id: I426944d451f9b9133e5cd26989c517790a38f096
---
M tests/phpunit/includes/SubobjectTest.php
1 file changed, 15 insertions(+), 0 deletions(-)

Approvals:
  Mwjames: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/tests/phpunit/includes/SubobjectTest.php 
b/tests/phpunit/includes/SubobjectTest.php
index 8c8d57a..6281417 100644
--- a/tests/phpunit/includes/SubobjectTest.php
+++ b/tests/phpunit/includes/SubobjectTest.php
@@ -46,6 +46,7 @@
         * @return array
         */
        public function getDataProvider() {
+               $diPropertyError = new \SMWDIProperty( 
\SMWDIProperty::TYPE_ERROR );
                return array(
                        array(
                                // #0
@@ -137,6 +138,20 @@
                                )
                        ),
 
+                       // #6 Improper value for wikipage property will add an 
'Has improper value for'
+                       array(
+                               'Bar',
+                               array(
+                                       'identifier' => 'bar',
+                                       'property' => array( 'Foo' => '' )
+                               ),
+                               array( // Expected results
+                                       'name' => 'bar',
+                                       'errors' => 1,
+                                       'propertyLabel' => array( 
$diPropertyError->getLabel(), 'Foo' ),
+                                       'propertyValue' => 'Foo',
+                               )
+                       ),
                );
        }
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I426944d451f9b9133e5cd26989c517790a38f096
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SemanticMediaWiki
Gerrit-Branch: master
Gerrit-Owner: Mwjames <jamesin.hongkon...@gmail.com>
Gerrit-Reviewer: Mwjames <jamesin.hongkon...@gmail.com>
Gerrit-Reviewer: jenkins-bot

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

Reply via email to