Mattflaschen has uploaded a new change for review.
https://gerrit.wikimedia.org/r/91138
Change subject: Test BagOStuff->incr method
......................................................................
Test BagOStuff->incr method
Change-Id: I3b72f19df82ee302dee47dcf22b69ed9bb6ff8e0
---
M tests/phpunit/includes/objectcache/BagOStuffTest.php
1 file changed, 9 insertions(+), 0 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/38/91138/1
diff --git a/tests/phpunit/includes/objectcache/BagOStuffTest.php
b/tests/phpunit/includes/objectcache/BagOStuffTest.php
index be603e5..25fabc8 100644
--- a/tests/phpunit/includes/objectcache/BagOStuffTest.php
+++ b/tests/phpunit/includes/objectcache/BagOStuffTest.php
@@ -118,6 +118,15 @@
$this->assertEquals( $this->cache->get( $key ), $value );
}
+ public function testIncr() {
+ $key = wfMemcKey( 'test' );
+ $this->cache->add( $key, 0 );
+ $this->cache->incr( $key );
+ $expectedValue = 1;
+ $actualValue = $this->cache->get( $key );
+ $this->assertEquals( $expectedValue, $actualValue, 'Value
should be 1 after incrementing' );
+ }
+
public function testGetMulti() {
$value1 = array( 'this' => 'is', 'a' => 'test' );
$value2 = array( 'this' => 'is', 'another' => 'test' );
--
To view, visit https://gerrit.wikimedia.org/r/91138
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I3b72f19df82ee302dee47dcf22b69ed9bb6ff8e0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Mattflaschen <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits