Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F5970298
MWOAuthHooksTest.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
964 B
Referenced Files
None
Subscribers
None
MWOAuthHooksTest.php
View Options
<?php
namespace
MediaWiki\Extension\OAuth\Tests\Backend
;
use
MediaWiki\Extension\OAuth\Backend\Hooks
;
use
MediaWiki\Status\Status
;
use
MediaWiki\User\User
;
use
MediaWikiIntegrationTestCase
;
/**
* @covers \MediaWiki\Extension\OAuth\Backend\MWOAuthServer
* @group OAuth
*/
class
MWOAuthHooksTest
extends
MediaWikiIntegrationTestCase
{
/**
* @dataProvider provideOnChangeTagCanCreate
*/
public
function
testOnChangeTagCanCreate
(
$tagName
,
$statusOk
)
{
$status
=
Status
::
newGood
();
$services
=
$this
->
getServiceContainer
();
$hooks
=
new
Hooks
(
$services
->
getChangeTagDefStore
(),
$services
->
getConnectionProvider
()
);
$hooks
->
onChangeTagCanCreate
(
$tagName
,
new
User
,
$status
);
$this
->
assertSame
(
$statusOk
,
$status
->
isOK
()
);
}
public
static
function
provideOnChangeTagCanCreate
()
{
return
[
[
'foo'
,
true
],
[
'OAuth CID'
,
true
],
[
'OAuth CID:'
,
false
],
[
'oauth cid:'
,
false
],
[
'OAuth CID: 123'
,
false
],
];
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sat, Oct 3, 14:23 (5 h, 38 m ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
45/ed/b573514b017d5a38a4496b673ba0
Default Alt Text
MWOAuthHooksTest.php (964 B)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment