Thiemo Mättig (WMDE) has uploaded a new change for review.

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

Change subject: Reword obfuscated assertions in EntityChangeTest
......................................................................

Reword obfuscated assertions in EntityChangeTest

Change-Id: Ifa55d802b9a6dd998e05aed032b68240a5e58732
---
M lib/tests/phpunit/changes/EntityChangeTest.php
1 file changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase 
refs/changes/91/253891/1

diff --git a/lib/tests/phpunit/changes/EntityChangeTest.php 
b/lib/tests/phpunit/changes/EntityChangeTest.php
index ce8ca1c..704b242 100644
--- a/lib/tests/phpunit/changes/EntityChangeTest.php
+++ b/lib/tests/phpunit/changes/EntityChangeTest.php
@@ -157,13 +157,13 @@
         * @since 0.4
         */
        public function testToString( EntityChange $entityChange ) {
-               $s = "$entityChange"; // magically calls __toString()
+               $string = $entityChange->__toString();
 
                $id = $entityChange->getEntityId()->getSerialization();
                $type = $entityChange->getType();
 
-               $this->assertTrue( stripos( $s, $id ) !== false, "missing 
entity ID $id" );
-               $this->assertTrue( stripos( $s, $type ) !== false, "missing 
type $type" );
+               $this->assertContains( $id, $string, "missing entity ID $id" );
+               $this->assertContains( $type, $string, "missing type $type" );
        }
 
        public function testGetComment() {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifa55d802b9a6dd998e05aed032b68240a5e58732
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Thiemo Mättig (WMDE) <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to