znt/module/bi/test/model/getlogfile.php

26 lines
1.1 KiB
PHP
Executable file
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/usr/bin/env php
<?php
include dirname(__FILE__, 5) . '/test/lib/init.php';
include dirname(__FILE__, 2) . '/lib/model.class.php';
/**
title=测试 biModel::getLogFile();
timeout=0
cid=15174
- 步骤1正常调用getLogFile方法返回字符串 @1
- 步骤2验证返回值包含日志目录 @1
- 步骤3验证返回值包含syncparquet前缀 @1
- 步骤4验证返回值包含.log.php扩展名 @1
- 步骤5验证返回值包含当前日期 @1
*/
$biTest = new biModelTest();
r(is_string($biTest->getLogFileTest())) && p() && e('1'); // 步骤1正常调用getLogFile方法返回字符串
r(strpos($biTest->getLogFileTest(), 'log/') !== false) && p() && e('1'); // 步骤2验证返回值包含日志目录
r(strpos($biTest->getLogFileTest(), 'syncparquet') !== false) && p() && e('1'); // 步骤3验证返回值包含syncparquet前缀
r(strpos($biTest->getLogFileTest(), '.log.php') !== false) && p() && e('1'); // 步骤4验证返回值包含.log.php扩展名
r(strpos($biTest->getLogFileTest(), date('Ymd')) !== false) && p() && e('1'); // 步骤5验证返回值包含当前日期