Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F9704770
SorensenDiceCoefficientTest.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
610 B
Referenced Files
None
Subscribers
None
SorensenDiceCoefficientTest.php
View Options
<?php
declare
(
strict_types
=
1
);
namespace
Keruald\OmniTools\Tests\Strings
;
use
Keruald\OmniTools\Strings\SorensenDiceCoefficient
;
use
PHPUnit\Framework\TestCase
;
class
SorensenDiceCoefficientTest
extends
TestCase
{
public
function
testCoefficient
()
:
void
{
$actual
=
new
SorensenDiceCoefficient
(
'night'
,
'nacht'
);
$this
->
assertEquals
(
0.25
,
$actual
->
compute
());
}
public
function
testComputeFor
()
:
void
{
$score
=
SorensenDiceCoefficient
::
computeFor
(
'night'
,
'nacht'
);
$this
->
assertGreaterThan
(
0
,
$score
);
$this
->
assertLessThan
(
1
,
$score
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sat, Jun 14, 07:06 (18 h, 12 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2683717
Default Alt Text
SorensenDiceCoefficientTest.php (610 B)
Attached To
Mode
rKERUALD Keruald libraries development repository
Attached
Detach File
Event Timeline
Log In to Comment