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

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

Change subject: More robust AssertTest
......................................................................

More robust AssertTest

Change-Id: I68a91c4061f04b3f254ce3cda1f698091b8d87b3
---
M tests/phpunit/AssertTest.php
1 file changed, 6 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/libs/Assert 
refs/changes/37/316337/1

diff --git a/tests/phpunit/AssertTest.php b/tests/phpunit/AssertTest.php
index 5b68b31..d25f982 100644
--- a/tests/phpunit/AssertTest.php
+++ b/tests/phpunit/AssertTest.php
@@ -38,8 +38,9 @@
        public function testParameter_fail() {
                try {
                        Assert::parameter( false, 'test', 'testing' );
+                       $this->fail( 'Expected ParameterAssertionException' );
                } catch ( ParameterAssertionException $ex ) {
-                       $this->assertEquals( 'test', $ex->getParameterName() );
+                       $this->assertSame( 'test', $ex->getParameterName() );
                }
        }
 
@@ -111,8 +112,8 @@
                        Assert::parameterType( $type, $value, 'test' );
                        $this->fail( 'Expected ParameterTypeException' );
                } catch ( ParameterTypeException $ex ) {
-                       $this->assertEquals( $type, $ex->getParameterType() );
-                       $this->assertEquals( 'test', $ex->getParameterName() );
+                       $this->assertSame( $type, $ex->getParameterType() );
+                       $this->assertSame( 'test', $ex->getParameterName() );
                }
        }
 
@@ -157,8 +158,8 @@
                        Assert::parameterElementType( $type, $value, 'test' );
                        $this->fail( 'Expected ParameterElementTypeException' );
                } catch ( ParameterElementTypeException $ex ) {
-                       $this->assertEquals( $type, $ex->getElementType() );
-                       $this->assertEquals( 'test', $ex->getParameterName() );
+                       $this->assertSame( $type, $ex->getElementType() );
+                       $this->assertSame( 'test', $ex->getParameterName() );
                }
        }
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I68a91c4061f04b3f254ce3cda1f698091b8d87b3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/libs/Assert
Gerrit-Branch: master
Gerrit-Owner: Thiemo Mättig (WMDE) <thiemo.maet...@wikimedia.de>

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

Reply via email to