znt/module/backup/test/model/getdirsize.php

29 lines
952 B
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
/**
title=测试 backupModel::getDirSize();
timeout=0
cid=15136
- 执行backupTest模块的getDirSizeTest方法参数是'/nonexistent/dir/path' @0
- 执行backupTest模块的getDirSizeTest方法参数是'' @0
- 执行backupTest模块的getDirSizeTest方法参数是null @0
- 执行backupTest模块的getDirSizeTest方法参数是dirname @1
- 执行backupTest模块的getDirSizeTest方法参数是dirname @1
*/
include dirname(__FILE__, 5) . '/test/lib/init.php';
include dirname(__FILE__, 2) . '/lib/model.class.php';
su('admin');
$backupTest = new backupModelTest();
r($backupTest->getDirSizeTest('/nonexistent/dir/path')) && p() && e(0);
r($backupTest->getDirSizeTest('')) && p() && e(0);
r($backupTest->getDirSizeTest(null)) && p() && e(0);
r($backupTest->getDirSizeTest(dirname(__FILE__, 5) . '/test') > 0) && p() && e(1);
r($backupTest->getDirSizeTest(dirname(__FILE__, 2)) > 0) && p() && e(1);