Skip to content

Commit

Permalink
Add test for Oracle 12c.
Browse files Browse the repository at this point in the history
  • Loading branch information
terabytesoftw committed Jul 13, 2023
1 parent 0aa1fc5 commit 52281e8
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
14 changes: 13 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,26 @@ jobs:
- 1521:1521
env:
ORACLE_DATABASE : yiitest
ORACLE_PASSWORD : root
ORACLE_PASSWORD : oracle
options: >-
--name=oci
--health-cmd healthcheck.sh
--health-interval 10s
--health-timeout 5s
--health-retries 10
oci-12:
image: konnecteam/docker-oracle-12c
ports:
- 1521:1521
options: >-
--name=oci-12
--health-cmd healthcheck.sh
--health-interval 10s
--health-timeout 5s
--health-retries 10
steps:
- name: Checkout.
uses: actions/checkout@v3
Expand Down
4 changes: 2 additions & 2 deletions tests/Support/TestTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ trait TestTrait
*/
protected function getConnection(bool $fixture = false): PdoConnectionInterface
{
$db = new Connection(new Driver($this->getDsn(), 'system', 'root'), DbHelper::getSchemaCache());
$db = new Connection(new Driver($this->getDsn(), 'system', 'oracle'), DbHelper::getSchemaCache());

if ($fixture) {
DbHelper::loadFixture($db, __DIR__ . '/Fixture/oci.sql');
Expand All @@ -35,7 +35,7 @@ protected static function getDb(): PdoConnectionInterface
{
$dsn = (new Dsn('oci', 'localhost', 'XE', '1521', ['charset' => 'AL32UTF8']))->asString();

return new Connection(new Driver($dsn, 'system', 'root'), DbHelper::getSchemaCache());
return new Connection(new Driver($dsn, 'system', 'oracle'), DbHelper::getSchemaCache());
}

protected function getDsn(): string
Expand Down

0 comments on commit 52281e8

Please sign in to comment.