Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F12944236
OptionTest.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
527 B
Referenced Files
None
Subscribers
None
OptionTest.php
View Options
<?php
namespace
Keruald\OmniTools\Tests\DataTypes\Option
;
use
Keruald\OmniTools\DataTypes\Option\None
;
use
Keruald\OmniTools\DataTypes\Option\Option
;
use
Keruald\OmniTools\DataTypes\Option\Some
;
use
PHPUnit\Framework\TestCase
;
class
OptionTest
extends
TestCase
{
public
function
testFrom
()
:
void
{
$this
->
assertEquals
(
new
Some
(
42
),
Option
::
from
(
42
));
}
public
function
testFromWhenValueIsNull
()
:
void
{
$actual
=
Option
::
from
(
null
);
$this
->
assertTrue
(
$actual
->
isNone
());
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Tue, Nov 18, 17:10 (22 h, 36 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3162769
Default Alt Text
OptionTest.php (527 B)
Attached To
Mode
rKOT Keruald OmniTools
Attached
Detach File
Event Timeline
Log In to Comment