Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F5979100
EchoExecuteFirstArgumentStub.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
762 B
Referenced Files
None
Subscribers
None
EchoExecuteFirstArgumentStub.php
View Options
<?php
namespace
MediaWiki\Extension\Notifications\Test\Integration\Mapper
;
use
PHPUnit\Framework\MockObject\Invocation
;
use
PHPUnit\Framework\MockObject\Invocation\StaticInvocation
;
use
PHPUnit\Framework\MockObject\Stub\Stub
;
class
EchoExecuteFirstArgumentStub
implements
Stub
{
public
function
invoke
(
Invocation
$invocation
)
{
if
(
!
$invocation
instanceof
StaticInvocation
)
{
throw
new
\PHPUnit\Framework\Exception
(
'wrong invocation type'
);
}
if
(
!
$invocation
->
arguments
)
{
throw
new
\PHPUnit\Framework\Exception
(
'Method call must have an argument'
);
}
return
call_user_func
(
reset
(
$invocation
->
arguments
)
);
}
public
function
toString
():
string
{
return
'return result of call_user_func on first invocation argument'
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sat, Oct 3, 20:45 (4 d, 10 h ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
28/02/5259dfe00525284cff85888b7ca2
Default Alt Text
EchoExecuteFirstArgumentStub.php (762 B)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment