|
@@ -1,4 +1,6 @@
|
|
|
-<?php
|
|
|
+<?php declare(strict_types=1);
|
|
|
+
|
|
|
+use PHPUnit\Framework\TestCase;
|
|
|
|
|
|
/**
|
|
|
* Created by PhpStorm.
|
|
@@ -9,15 +11,17 @@
|
|
|
|
|
|
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/bonus_helper.php');
|
|
|
require_once(BASE_ROOT_PATH . '/helper/account_helper.php');
|
|
|
require_once(BASE_ROOT_PATH . '/helper/category_helper.php');
|
|
|
require_once(BASE_ROOT_PATH . '/helper/brand_helper.php');
|
|
|
|
|
|
-class testAccountHelper extends PHPUnit_Framework_TestCase
|
|
|
+class TestAccountHelper extends TestCase
|
|
|
{
|
|
|
- public static function setUpBeforeClass()
|
|
|
+ public static function setUpBeforeClass() : void
|
|
|
{
|
|
|
Base::run_util();
|
|
|
}
|
|
@@ -63,7 +67,7 @@ class testAccountHelper extends PHPUnit_Framework_TestCase
|
|
|
{
|
|
|
$mod = Model('order');
|
|
|
$pay_sn = '910510761110261481';
|
|
|
- $order_info = $mod->getOrderInfo(array('pay_sn' => $pay_sn));
|
|
|
+ $order_info = $mod->getOrderInfo(['pay_sn' => $pay_sn]);
|
|
|
$logic_order = Logic('order');
|
|
|
$result = $logic_order->changeOrderStateReceive($order_info,'system','系统','超期未收货系统自动完成订单');
|
|
|
}
|
|
@@ -71,7 +75,7 @@ class testAccountHelper extends PHPUnit_Framework_TestCase
|
|
|
public function testUpfile()
|
|
|
{
|
|
|
$file = '/Users/stanley-king/work/PHPProject/shopnc/data/upload/uploadtmp/20161215081131-53be4be9-fe01-50e7-28c0-ded900c9a0f6.jpg';
|
|
|
- $ext = exif_imagetype($file);
|
|
|
+ $ext = exif_imagetype($file);
|
|
|
$exif = image_type_to_mime_type($ext);
|
|
|
$tagnmae = exif_tagname($ext);
|
|
|
|
|
@@ -87,8 +91,9 @@ class testAccountHelper extends PHPUnit_Framework_TestCase
|
|
|
account_helper::onAsyncBroadcastOrder('290563492188164623',0.1,30);
|
|
|
}
|
|
|
|
|
|
- public static function tearDownAfterClass()
|
|
|
+ public static function tearDownAfterClass():void
|
|
|
{
|
|
|
+
|
|
|
}
|
|
|
|
|
|
}
|