Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F12373566
CodeMethodTest.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
909 B
Referenced Files
None
Subscribers
None
CodeMethodTest.php
View Options
<?php
namespace
Keruald\OmniTools\Reflection
;
use
Keruald\OmniTools\Collections\Vector
;
use
PHPUnit\Framework\TestCase
;
use
ReflectionMethod
;
class
CodeMethodTest
extends
TestCase
{
public
function
testGetArgumentsType
()
{
// public function replace(iterable $iterable, int $offset = 0, int $len = 0) : self
$method
=
new
ReflectionMethod
(
new
Vector
,
"replace"
);
$method
=
CodeMethod
::
fromReflectionMethod
(
$method
);
$expected
=
Vector
::
from
([
"iterable"
,
"int"
,
"int"
,
]);
$actual
=
$method
->
getArgumentsType
();
$this
->
assertEquals
(
$expected
,
$actual
);
}
public
function
testFromReflectionMethod
()
{
$method
=
new
ReflectionMethod
(
new
Vector
,
"replace"
);
$method
=
CodeMethod
::
fromReflectionMethod
(
$method
);
$this
->
assertInstanceOf
(
CodeMethod
::
class
,
$method
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sat, Nov 1, 17:54 (1 d, 30 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3112246
Default Alt Text
CodeMethodTest.php (909 B)
Attached To
Mode
rKERUALD Keruald libraries development repository
Attached
Detach File
Event Timeline
Log In to Comment