cii-text-analysis/vendor/yooper/php-text-analysis/tests/TextAnalysis/Analysis/DateAnalysisTest.php
Jéremy Munsch f68d2ac333
premier poc
2026-02-11 08:24:04 +01:00

19 lines
456 B
PHP
Executable file

<?php
namespace Tests\TextAnalysis\Analysis;
use TextAnalysis\Analysis\DateAnalysis;
/**
*
* @author yooper
*/
class DateAnalysisTest extends \PHPUnit\Framework\TestCase
{
public function testDateAnalysis()
{
$text = "I went for a walk in Sep. I think it was 1st and the year was 2015";
$dateAnalysis = new DateAnalysis($text);
$this->assertEquals("2015-09-01", $dateAnalysis->getDates()[0]->format('Y-m-d'));
}
}