⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 magic_db.test.php

📁 Cake Framwork , Excellent
💻 PHP
📖 第 1 页 / 共 5 页
字号:
/** * MagicDb::toArray should either return the MagicDb::db property, or the parsed array data if a magic.db dump is passed in as the first argument * * @access public */	function testToArray() {		$this->Db->db = array();		$r = $this->Db->toArray();		$this->assertTrue($r === array());		$this->Db->db = array('foo' => 'bar');		$r = $this->Db->toArray();		$this->assertTrue($r === array('foo' => 'bar'));		$r = $this->Db->toArray(array('yeah'));		$this->assertTrue($r === array('yeah'));		$r = $this->Db->toArray('foo');		$this->assertTrue($r === array());		$r = $this->Db->toArray(MagicDbTestData::get('magic.snippet.db'));		$this->assertTrue($r === MagicDbTestData::get('magic.snippet.db.result'));	}/** * The MagicDb::validates function should return if the array passed to it or the local db property contains a valid MagicDb record set * * @access public */	function testValidates() {		$r = $this->Db->validates(array());		$this->assertTrue($r === false);		$r = $this->Db->validates(array('header' => true, 'database' => true));		$this->assertTrue($r === false);		$magicDb = array('header' => array(), 'database' => array());

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -