1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-04 05:37:32 +02:00

Retrieve fetch only with index.

This commit is contained in:
Cameron
2019-02-13 12:12:41 -08:00
parent f1551a4613
commit a83f82d09c

View File

@@ -266,6 +266,12 @@
$this->assertArrayHasKey('banner', $result); $this->assertArrayHasKey('banner', $result);
$this->assertArrayHasKey('plugin_name', $result['banner']); $this->assertArrayHasKey('plugin_name', $result['banner']);
// Fetch only mode
$this->db->select('plugin');
$result = $this->db->retrieve(null, 'plugin_id, plugin_name, plugin_path', '', true, 'plugin_path');
$this->assertArrayHasKey('banner', $result);
$this->assertArrayHasKey('plugin_name', $result['banner']);
} }
public function testSelect() public function testSelect()
@@ -390,10 +396,10 @@
$actual = $this->db->db_Insert('tmp', array('tmp_ip' => '127.0.0.1', 'tmp_time' => time(), 'tmp_info' => 'test 2')); $actual = $this->db->db_Insert('tmp', array('tmp_ip' => '127.0.0.1', 'tmp_time' => time(), 'tmp_info' => 'test 2'));
$this->assertTrue($actual); $this->assertTrue($actual);
// $this->db->debugMode(true);// todo causes a hang while testing. (see db_Query() ) $this->db->debugMode(true);// todo causes a hang while testing. (see db_Query() )
$actual = $this->db->db_Insert('missing_table', array('tmp_ip' => '127.0.0.1', 'tmp_time' => time(), 'tmp_info' => 'test 2')); $actual = $this->db->db_Insert('missing_table', array('tmp_ip' => '127.0.0.1', 'tmp_time' => time(), 'tmp_info' => 'test 2'));
$this->assertFalse($actual); $this->assertFalse($actual);
// $this->db->debugMode(false); $this->db->debugMode(false);
} }