|
@@ -9,7 +9,9 @@ define('BASE_ROOT_PATH', str_replace('/test', '', dirname(__FILE__)));
|
|
|
require_once(BASE_ROOT_PATH . '/global.php');
|
|
|
require_once(BASE_CORE_PATH . '/lrlz.php');
|
|
|
require_once(BASE_ROOT_PATH . '/fooder.php');
|
|
|
-require_once (BASE_ROOT_PATH . '/helper/statistics/stat_refill.php');
|
|
|
+
|
|
|
+require_once(BASE_HELPER_PATH . '/refill/ops/order_clear.php');
|
|
|
+require_once(BASE_HELPER_PATH . '/refill/ops/pdlog_clear.php');
|
|
|
|
|
|
class TestRefillCommand extends TestCase
|
|
|
{
|
|
@@ -27,4 +29,20 @@ class TestRefillCommand extends TestCase
|
|
|
$refill = new statistics\stat_refill();
|
|
|
$refill->restat($dates);
|
|
|
}
|
|
|
+
|
|
|
+ public function testCurDate()
|
|
|
+ {
|
|
|
+ $end_date = strtotime(date('Y-m-d',time()));
|
|
|
+ $start_date = $end_date - 86400;
|
|
|
+
|
|
|
+ $clear = new refill\order_clear();
|
|
|
+ $clear->clear($start_date,$end_date);
|
|
|
+
|
|
|
+ $sDate = date('Y-m-d',$start_date);
|
|
|
+ $refill = new statistics\stat_refill();
|
|
|
+ $refill->restat([$sDate]);
|
|
|
+
|
|
|
+ $clear = new refill\pdlog_clear();
|
|
|
+ $clear->clear($start_date,$end_date);
|
|
|
+ }
|
|
|
}
|