Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F7445674
InvokedAtLeastOnce.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
InvokedAtLeastOnce.php
View Options
<?php
declare
(
strict_types
=
1
);
/*
* This file is part of PHPUnit.
*
* (c) Sebastian Bergmann <sebastian@phpunit.de>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace
PHPUnit\Framework\MockObject\Rule
;
use
PHPUnit\Framework\ExpectationFailedException
;
use
PHPUnit\Framework\MockObject\Invocation
as
BaseInvocation
;
/**
* @internal This class is not covered by the backward compatibility promise for PHPUnit
*/
final
class
InvokedAtLeastOnce
extends
InvocationOrder
{
public
function
toString
():
string
{
return
'invoked at least once'
;
}
/**
* Verifies that the current expectation is valid. If everything is OK the
* code should just return, if not it must throw an exception.
*
* @throws ExpectationFailedException
*/
public
function
verify
():
void
{
$count
=
$this
->
getInvocationCount
();
if
(
$count
<
1
)
{
throw
new
ExpectationFailedException
(
'Expected invocation at least once but it never occurred.'
,
);
}
}
public
function
matches
(
BaseInvocation
$invocation
):
bool
{
return
true
;
}
protected
function
invokedDo
(
BaseInvocation
$invocation
):
void
{
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sun, Nov 22, 18:15 (1 d, 8 h ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
0d/51/f181c2530a2ce7e4754530ceeeca
Default Alt Text
InvokedAtLeastOnce.php (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment