mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-19 00:28:47 +02:00
✅ Optimize tests execution time (x10 / no need for a systematic check of date formats, which was ok as a first approach)
This commit is contained in:
@@ -490,7 +490,7 @@ class ExpressionEvaluateTest extends ItopDataTestCase
|
||||
{
|
||||
$oExpression = new FunctionExpression('DATE_FORMAT', array(new ScalarExpression($sDate), new ScalarExpression("%$sFormat")));
|
||||
$itopExpressionResult = $oExpression->Evaluate(array());
|
||||
static::assertSame($aMysqlDateFormatRsultsForAllFormats[$sFormat], $itopExpressionResult, "Format %$sFormat not matching MySQL for '$sDate'");
|
||||
$this->assertSame($aMysqlDateFormatRsultsForAllFormats[$sFormat], $itopExpressionResult, "Format %$sFormat not matching MySQL for '$sDate'");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -536,7 +536,7 @@ class ExpressionEvaluateTest extends ItopDataTestCase
|
||||
public function EveryTimeFormatOnDateRangeProvider()
|
||||
{
|
||||
return array(
|
||||
'10 years, day by day' => array('2000-01-01', 'P1D', 365 * 10),
|
||||
'10 years, each 17 days' => array('2000-01-01', 'P17D', 365 * 10 / 17),
|
||||
'1 day, hour by hour' => array('2000-01-01 00:01:02', 'PT1H', 24),
|
||||
'1 hour, minute by minute' => array('2000-01-01 00:01:02', 'PT1M', 60),
|
||||
'1 minute, second by second' => array('2000-01-01 00:01:02', 'PT1S', 60),
|
||||
|
||||
Reference in New Issue
Block a user