From cf0ebed65ad14dc9a48b0d69e0d77fc5f4f83e92 Mon Sep 17 00:00:00 2001 From: Kunal Mehta Date: Sun, 24 Dec 2017 23:26:26 -0800 Subject: [PATCH] Add @covers tags to objectcache tests Change-Id: I5db623a582a0424f50d939aaa14fe29da9358b4f --- tests/phpunit/includes/libs/objectcache/BagOStuffTest.php | 3 +++ tests/phpunit/includes/objectcache/MemcachedBagOStuffTest.php | 2 ++ tests/phpunit/includes/objectcache/RESTBagOStuffTest.php | 2 ++ 3 files changed, 7 insertions(+) diff --git a/tests/phpunit/includes/libs/objectcache/BagOStuffTest.php b/tests/phpunit/includes/libs/objectcache/BagOStuffTest.php index f2fe07de40..4320d80249 100644 --- a/tests/phpunit/includes/libs/objectcache/BagOStuffTest.php +++ b/tests/phpunit/includes/libs/objectcache/BagOStuffTest.php @@ -163,6 +163,9 @@ class BagOStuffTest extends MediaWikiTestCase { $this->assertTrue( $this->cache->add( $key, 'test' ) ); } + /** + * @covers BagOStuff::get + */ public function testGet() { $value = [ 'this' => 'is', 'a' => 'test' ]; diff --git a/tests/phpunit/includes/objectcache/MemcachedBagOStuffTest.php b/tests/phpunit/includes/objectcache/MemcachedBagOStuffTest.php index 9cb2f9493b..7eb55820e5 100644 --- a/tests/phpunit/includes/objectcache/MemcachedBagOStuffTest.php +++ b/tests/phpunit/includes/objectcache/MemcachedBagOStuffTest.php @@ -70,6 +70,7 @@ class MemcachedBagOStuffTest extends MediaWikiTestCase { /** * @dataProvider validKeyProvider + * @covers MemcachedBagOStuff::validateKeyEncoding */ public function testValidateKeyEncoding( $key ) { $this->assertSame( $key, $this->cache->validateKeyEncoding( $key ) ); @@ -86,6 +87,7 @@ class MemcachedBagOStuffTest extends MediaWikiTestCase { /** * @dataProvider invalidKeyProvider + * @covers MemcachedBagOStuff::validateKeyEncoding */ public function testValidateKeyEncodingThrowsException( $key ) { $this->setExpectedException( 'Exception' ); diff --git a/tests/phpunit/includes/objectcache/RESTBagOStuffTest.php b/tests/phpunit/includes/objectcache/RESTBagOStuffTest.php index f722fe13f8..4ef4aabb92 100644 --- a/tests/phpunit/includes/objectcache/RESTBagOStuffTest.php +++ b/tests/phpunit/includes/objectcache/RESTBagOStuffTest.php @@ -1,6 +1,8 @@