Commit a3701527 authored by Marco Pivetta's avatar Marco Pivetta Committed by GitHub

Merge pull request #2630 from deeky666/DBAL-2626

[DBAL2626] Add PHPUnit config for continuousphp Oracle testing
parents f491c788 090329a7
......@@ -3,6 +3,7 @@
namespace Doctrine\Tests\DBAL\Functional\Driver\OCI8;
use Doctrine\DBAL\Driver\OCI8\Driver;
use Doctrine\DBAL\Schema\Table;
use Doctrine\Tests\DbalFunctionalTestCase;
class OCI8ConnectionTest extends DbalFunctionalTestCase
......@@ -32,12 +33,20 @@ class OCI8ConnectionTest extends DbalFunctionalTestCase
*/
public function testLastInsertIdAcceptsFqn()
{
$this->_conn->executeUpdate('CREATE SEQUENCE dbal2595_seq');
$this->_conn->executeUpdate('CREATE TABLE DBAL2595(id NUMBER DEFAULT dbal2595_seq.NEXTVAL, foo NUMBER)');
$platform = $this->_conn->getDatabasePlatform();
$schemaManager = $this->_conn->getSchemaManager();
$table = new Table('DBAL2595');
$table->addColumn('id', 'integer', array('autoincrement' => true));
$table->addColumn('foo', 'integer');
$schemaManager->dropAndCreateTable($table);
$this->_conn->executeUpdate('INSERT INTO DBAL2595 (foo) VALUES (1)');
$schema = $this->_conn->getDatabase();
$sequence = $platform->getIdentitySequenceName($schema . '.DBAL2595', 'id');
$this->assertSame(1, $this->driverConnection->lastInsertId($schema . '.dbal2595_seq'));
$this->assertSame(1, $this->driverConnection->lastInsertId($sequence));
}
}
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/4.8/phpunit.xsd"
backupGlobals="false"
colors="true"
bootstrap="../../vendor/autoload.php"
>
<php>
<ini name="error_reporting" value="-1" />
<var name="db_type" value="oci8"/>
<var name="db_host" value="oracle-xe-11" />
<var name="db_username" value="C##doctrine" />
<var name="db_password" value="ORACLE" />
<var name="db_name" value="XE" />
<var name="db_port" value="1521"/>
<var name="db_event_subscribers" value="Doctrine\DBAL\Event\Listeners\OracleSessionInit"/>
<var name="tmpdb_type" value="oci8"/>
<var name="tmpdb_host" value="oracle-xe-11" />
<var name="tmpdb_username" value="ORACLE" />
<var name="tmpdb_password" value="ORACLE" />
<var name="tmpdb_name" value="XE" />
<var name="tmpdb_port" value="1521"/>
</php>
<testsuites>
<testsuite name="Doctrine DBAL Test Suite">
<directory>../Doctrine/Tests/DBAL</directory>
</testsuite>
</testsuites>
<groups>
<exclude>
<group>performance</group>
<group>locking_functional</group>
</exclude>
</groups>
</phpunit>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment