1234567891011121314151617181920212223242526272829303132333435 |
- <?php
- use PHPUnit\Framework\TestCase;
- define('APP_ID', 'balance');
- 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_HELPER_PATH . '/statistics/refill_balance.php');
- class TestRefillBalance extends TestCase
- {
- public static function setUpBeforeClass(): void
- {
- Base::run_util();
- }
- public function testAddBalance()
- {
- $refill_balance = new statistics\refill_balance();
- $refill_balance->add_balance('system', 0, 0, strtotime('2021-12-01'),'order_time');
- }
- //docker-compose run -d phpcli php /var/www/html/phpunit-9.2.5.phar --filter "/(TestRefillBalance::testInitBalance)( .*)?$/" --test-suffix TestRefillBalance.php /var/www/html/test
- public function testInitBalance()
- {
- $refill_balance = new statistics\refill_balance();
- $refill_balance->stat_all(0, strtotime('2022-01-15'));
- }
- }
|