Fix broken tests
This commit is contained in:
parent
617246d1d7
commit
7397b95e8b
@ -20,7 +20,7 @@
|
|||||||
"role": "Developer"
|
"role": "Developer"
|
||||||
}],
|
}],
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"phpunit/php-code-coverage": ">=1.2.10,<1.3.0",
|
"phpunit/php-code-coverage": ">=1.2.10,<1.3.0"
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=5.2.0"
|
"php": ">=5.2.0"
|
||||||
|
@ -793,11 +793,11 @@ abstract class QBTest extends UnitTestCase {
|
|||||||
|
|
||||||
public function TestGetCompiledSelect()
|
public function TestGetCompiledSelect()
|
||||||
{
|
{
|
||||||
$sql = $this->db->from('create_test')->get_compled_select('', FALSE);
|
$sql = $this->db->get_compiled_select('create_test');
|
||||||
$qb_res = $this->db->get();
|
$qb_res = $this->db->get('create_test');
|
||||||
$sql_res = $this->db->query($sql);
|
$sql_res = $this->db->query($sql);
|
||||||
|
|
||||||
$this->assertEqual($qb_res, $sql_res);
|
$this->assertClone($qb_res, $sql_res);
|
||||||
}
|
}
|
||||||
|
|
||||||
// --------------------------------------------------------------------------
|
// --------------------------------------------------------------------------
|
||||||
|
@ -39,6 +39,16 @@ class FirebirdQBTest extends QBTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// --------------------------------------------------------------------------
|
// --------------------------------------------------------------------------
|
||||||
|
|
||||||
|
public function TestGetCompiledSelect()
|
||||||
|
{
|
||||||
|
$sql = $this->db->get_compiled_select('create_test');
|
||||||
|
$qb_res = $this->db->get('create_test');
|
||||||
|
$sql_res = $this->db->query($sql);
|
||||||
|
|
||||||
|
$this->assertIsA($qb_res, 'Firebird_Result');
|
||||||
|
$this->assertIsA($sql_res, 'Firebird_Result');
|
||||||
|
}
|
||||||
|
|
||||||
public function TestInsertBatch()
|
public function TestInsertBatch()
|
||||||
{
|
{
|
||||||
|
Binary file not shown.
@ -21,9 +21,15 @@ define('QBASE_DIR', str_replace(basename(QTEST_DIR), '', QTEST_DIR));
|
|||||||
define('QDS', DIRECTORY_SEPARATOR);
|
define('QDS', DIRECTORY_SEPARATOR);
|
||||||
|
|
||||||
// Include simpletest
|
// Include simpletest
|
||||||
// it has to be set in your php path, or put in the tests folder
|
// it has to be in the tests folder
|
||||||
require_once('simpletest/autorun.php');
|
require_once('simpletest/autorun.php');
|
||||||
|
|
||||||
|
// Require composer items, if they exist
|
||||||
|
if (is_dir(QBASE_DIR.'/vendor/'))
|
||||||
|
{
|
||||||
|
require_once(QBASE_DIR.'/vendor/autoload.php');
|
||||||
|
}
|
||||||
|
|
||||||
// Include db classes
|
// Include db classes
|
||||||
require_once(QBASE_DIR . 'autoload.php');
|
require_once(QBASE_DIR . 'autoload.php');
|
||||||
|
|
||||||
|
@ -51,12 +51,12 @@ function run_local_tests() {
|
|||||||
$suite = $loader->createSuiteFromClasses(
|
$suite = $loader->createSuiteFromClasses(
|
||||||
basename(initial_file()),
|
basename(initial_file()),
|
||||||
$loader->selectRunnableTests($candidates));
|
$loader->selectRunnableTests($candidates));
|
||||||
if (function_exists("xdebug_start_code_coverage")) {
|
if (function_exists("xdebug_start_code_coverage") && is_dir(QBASE_DIR.'/vendor/')) {
|
||||||
$coverage = new PHP_CodeCoverage;
|
$coverage = new PHP_CodeCoverage;
|
||||||
$coverage->start('Query');
|
$coverage->start('Query');
|
||||||
}
|
}
|
||||||
$ret = $suite->run(new DefaultReporter());
|
$ret = $suite->run(new DefaultReporter());
|
||||||
if (function_exists("xdebug_start_code_coverage")) {
|
if (function_exists("xdebug_start_code_coverage") && is_dir(QBASE_DIR.'/vendor/')) {
|
||||||
$coverage->stop();
|
$coverage->stop();
|
||||||
$writer = new PHP_CodeCoverage_Report_HTML;
|
$writer = new PHP_CodeCoverage_Report_HTML;
|
||||||
$writer->process($coverage, QBASE_DIR . '/coverage/');
|
$writer->process($coverage, QBASE_DIR . '/coverage/');
|
||||||
|
Loading…
Reference in New Issue
Block a user