Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F12945513
TypeTest.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
682 B
Referenced Files
None
Subscribers
None
TypeTest.php
View Options
<?php
namespace
Keruald\OmniTools\Tests\Reflection
;
use
Keruald\OmniTools\Reflection\Type
;
use
Keruald\OmniTools\Strings\Multibyte\OmniString
;
use
PHPUnit\Framework\Attributes\DataProvider
;
use
PHPUnit\Framework\TestCase
;
class
TypeTest
extends
TestCase
{
public
static
function
provideTypes
()
:
iterable
{
// From gettype()
yield
[
"foo"
,
"string"
];
yield
[
42
,
"integer"
];
// From get_class()
yield
[
new
OmniString
(),
OmniString
::
class
];
}
#[DataProvider("provideTypes")]
function
testGetTypeOf
(
mixed
$value
,
string
$expectedType
)
:
void
{
$this
->
assertEquals
(
$expectedType
,
Type
::
getTypeOf
(
$value
));
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Tue, Nov 18, 17:43 (21 h, 9 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3119624
Default Alt Text
TypeTest.php (682 B)
Attached To
Mode
rKERUALD Keruald libraries development repository
Attached
Detach File
Event Timeline
Log In to Comment