mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Thanks
synced 2024-11-15 02:54:23 +00:00
Remove PHP 5.3 $this closure workaround
Change-Id: Ic1f8147e85ad751927153d5a8f6330d37800aacb
This commit is contained in:
parent
b86678892c
commit
8055732ae0
|
@ -64,22 +64,21 @@ class ApiFlowThankIntegrationTest extends ApiTestCase {
|
|||
$mockLoader = $this->getMockBuilder( \Flow\Repository\RootPostLoader::class )
|
||||
->disableOriginalConstructor()
|
||||
->getMock();
|
||||
$that = $this;
|
||||
$mockLoader->expects( $this->any() )
|
||||
->method( 'getWithRoot' )
|
||||
->willReturnCallback(
|
||||
function ( $postId ) use ( $that ) {
|
||||
function ( $postId ) {
|
||||
switch ( $postId ) {
|
||||
case $that->postByOtherUser->getPostId():
|
||||
case $this->postByOtherUser->getPostId():
|
||||
return [
|
||||
'post' => $that->postByOtherUser,
|
||||
'root' => $that->topic
|
||||
'post' => $this->postByOtherUser,
|
||||
'root' => $this->topic
|
||||
];
|
||||
|
||||
case $that->postByMe->getPostId():
|
||||
case $this->postByMe->getPostId():
|
||||
return [
|
||||
'post' => $that->postByMe,
|
||||
'root' => $that->topic
|
||||
'post' => $this->postByMe,
|
||||
'root' => $this->topic
|
||||
];
|
||||
|
||||
default:
|
||||
|
|
Loading…
Reference in a new issue