magic_db.test.php
来自「Cake Framwork , Excellent」· PHP 代码 · 共 180 行 · 第 1/5 页
PHP
180 行
* The MagicDb instance to be tested * * @var object * @access public */ var $Db = null;/** * Sets up a MagicDb class instance for testing * * @access public */ function setUp() { $this->Db =& new MagicDb(); }/** * MagicDb::analyze should properly detect the file type and output additional info as requested. * * @access public */ function testAnalyze() { $r = $this->Db->read(MagicDbTestData::get('magic.db')); $this->assertTrue($r === true); $r = $this->Db->analyze(array()); $this->assertTrue($r === false); $r = $this->Db->analyze(WWW_ROOT.'img'.DS.'cake.icon.gif'); // TODO: Check several serialized file samples for accurate detection }/** * MagicDb::read should properly read MagicDb databases from .php-/.db-files and plain data arguments passed in and return false if the file wasn't found or * if the readed data did not validate. *
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?