Page MenuHomeDevCentral

SorensenDiceCoefficientTest.php
No OneTemporary

SorensenDiceCoefficientTest.php

<?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

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)

Event Timeline