From a3b5230831d08d83a239c1f124a480b382917f5b Mon Sep 17 00:00:00 2001
From: Brian Wolff <bawolff+wn@gmail.com>
Date: Thu, 14 Jul 2016 02:04:48 -0400
Subject: [PATCH] Add unit test I6392cf

Make sure that session limits affect rights added by hook.

Bug: T139670
Change-Id: I9ac17b2493bf7b7647d6b9943ce15e399bd4031d
---
 tests/phpunit/includes/session/BotPasswordSessionProviderTest.php | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/tests/phpunit/includes/session/BotPasswordSessionProviderTest.php b/tests/phpunit/includes/session/BotPasswordSessionProviderTest.php
index 9bc41c0..12f7948 100644
--- a/tests/phpunit/includes/session/BotPasswordSessionProviderTest.php
+++ b/tests/phpunit/includes/session/BotPasswordSessionProviderTest.php
@@ -59,6 +59,13 @@ class BotPasswordSessionProviderTest extends MediaWikiTestCase {
 			'wgGrantPermissions' => [
 				'test' => [ 'read' => true ],
 			],
+			'wgHooks' => [
+				'UserGetRights' => [
+					function ( $user, &$rights ) {
+						$rights['editinterface'] = true;
+					}
+				]
+			]
 		] );
 	}
 
-- 
2.0.1

