Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F12740739
OmniStringTest.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
742 B
Referenced Files
None
Subscribers
None
OmniStringTest.php
View Options
<?php
declare
(
strict_types
=
1
);
namespace
Keruald\OmniTools\Tests\Strings\Multibyte
;
use
Keruald\OmniTools\Strings\Multibyte\OmniString
;
use
PHPUnit\Framework\TestCase
;
use
InvalidArgumentException
;
class
OmniStringTest
extends
TestCase
{
/**
* @var OmniString
*/
private
$string
;
protected
function
setUp
()
{
$this
->
string
=
new
OmniString
(
"foo"
);
}
public
function
testToString
()
:
void
{
$this
->
assertEquals
(
"foo"
,
(
string
)
$this
->
string
);
$this
->
assertEquals
(
"foo"
,
$this
->
string
->
__toString
());
}
public
function
testPad
()
:
void
{
$paddedString
=
$this
->
string
->
pad
(
9
,
'-=-'
,
STR_PAD_BOTH
);
$this
->
assertEquals
(
"-=-foo-=-"
,
$paddedString
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sun, Nov 16, 13:05 (1 d, 14 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3170395
Default Alt Text
OmniStringTest.php (742 B)
Attached To
Mode
rKOT Keruald OmniTools
Attached
Detach File
Event Timeline
Log In to Comment