Update sqlite test for explain, attempt firebird tests on Travis CI

This commit is contained in:
Timothy Warren 2014-02-06 16:48:52 -05:00
parent 8d7b73a9a3
commit c07a4fcf14
2 changed files with 50 additions and 9 deletions

View File

@ -1,5 +1,12 @@
language: php
before_setup:
- sudo add-apt-repository ppa:mapopa -qq
- sudo apt-get update -qq
- sudo apt-get install firebird2.5-classic -qq
- sudo dpkg-reconfigure firebird2.5-classic -qq
- sudo apt-get install php5-interbase -qq
php:
- 5.2
- 5.3

View File

@ -73,17 +73,51 @@
$res = $query->fetchAll(PDO::FETCH_ASSOC);
var_export($res);
$expected_possibilities = array();
$expected = array (
array (
'selectid' => '0',
'order' => '0',
'from' => '0',
'detail' => 'SEARCH TABLE create_test USING INTEGER PRIMARY KEY (rowid>? AND rowid<?)',
),
$expected_possibilities[] = array(
array(
'order' => '0',
'from' => '0',
'detail' => 'TABLE create_test USING PRIMARY KEY',
)
);
//$this->assertEqual($expected, $res);
$expected_possibilities[] = array (
array (
'selectid' => '0',
'order' => '0',
'from' => '0',
'detail' => 'SEARCH TABLE create_test USING INTEGER PRIMARY KEY (rowid>? AND rowid<?) (~60000 rows)',
),
);
$expected_possibilities[] = array (
array (
'selectid' => '0',
'order' => '0',
'from' => '0',
'detail' => 'SEARCH TABLE create_test USING INTEGER PRIMARY KEY (rowid>? AND rowid<?)',
),
);
$passed = FALSE;
// Check for a matching possibility
foreach($expected_possibilities as $ep)
{
if ($res == $ep)
{
$this->assertTrue(TRUE);
$passed = TRUE;
}
}
// Well, apparently not an expected possibility
if ( ! $passed)
{
var_export($res);
$this->assertTrue(FALSE);
}
}
}