CakeDC / cakephp-oracle-driver

CakePHP 3 Driver for Oracle Database
Other
40 stars 24 forks source link

Tests can't be executed. #3

Closed hisame64 closed 8 years ago

hisame64 commented 8 years ago

I run phpunit, but error.

[vagrant@localhost public]$ vendor/bin/phpunit 
PHPUnit 5.2.9 by Sebastian Bergmann and contributors.

PHP Warning:  Fixture creation for "comments" failed "ORA-00904: : invalid identifier" in /home/dev/public/vendor/cakephp/cakephp/src/TestSuite/Fixture/TestFixture.php on line 303

Warning: Fixture creation for "comments" failed "ORA-00904: : invalid identifier" in /home/dev/public/vendor/cakephp/cakephp/src/TestSuite/Fixture/TestFixture.php on line 303
PHP Fatal error:  Uncaught exception 'CakeDC\OracleDriver\Database\OCI8\OCI8Exception' with message 'ORA-01747: invalid user.table.column, table.column, or column specification' in /home/dev/public/src/Database/OCI8/OCI8Exception.php:26
Stack trace:
#0 /home/dev/public/src/Database/OCI8/OCI8Statement.php(251): CakeDC\OracleDriver\Database\OCI8\OCI8Exception::fromErrorInfo(Array)
#1 /home/dev/public/vendor/cakephp/cakephp/src/Database/Statement/StatementDecorator.php(171): CakeDC\OracleDriver\Database\OCI8\OCI8Statement->execute(NULL)
#2 /home/dev/public/src/Database/Statement/OracleStatement.php(43): Cake\Database\Statement\StatementDecorator->execute(NULL)
#3 /home/dev/public/vendor/cakephp/cakephp/src/Database/Connection.php(270): CakeDC\OracleDriver\Database\Statement\OracleStatement->execute()
#4 /home/dev/public/vendor/cakephp/cakephp/src/Database/Query.php(188): Cake\Database\Connection->run(Object(Cake\Database\Query))
#5 /home/dev/public/vendor/cakephp/cakephp/src/TestSuite/Fixture/TestFixture.php(347): Cake\Database\Q in /home/dev/public/src/Database/OCI8/OCI8Exception.php on line 26

Fatal error: Uncaught exception 'CakeDC\OracleDriver\Database\OCI8\OCI8Exception' with message 'ORA-01747: invalid user.table.column, table.column, or column specification' in /home/dev/public/src/Database/OCI8/OCI8Exception.php:26
Stack trace:
#0 /home/dev/public/src/Database/OCI8/OCI8Statement.php(251): CakeDC\OracleDriver\Database\OCI8\OCI8Exception::fromErrorInfo(Array)
#1 /home/dev/public/vendor/cakephp/cakephp/src/Database/Statement/StatementDecorator.php(171): CakeDC\OracleDriver\Database\OCI8\OCI8Statement->execute(NULL)
#2 /home/dev/public/src/Database/Statement/OracleStatement.php(43): Cake\Database\Statement\StatementDecorator->execute(NULL)
#3 /home/dev/public/vendor/cakephp/cakephp/src/Database/Connection.php(270): CakeDC\OracleDriver\Database\Statement\OracleStatement->execute()
#4 /home/dev/public/vendor/cakephp/cakephp/src/Database/Query.php(188): Cake\Database\Connection->run(Object(Cake\Database\Query))
#5 /home/dev/public/vendor/cakephp/cakephp/src/TestSuite/Fixture/TestFixture.php(347): Cake\Database\Q in /home/dev/public/src/Database/OCI8/OCI8Exception.php on line 26

I think this driver can't use CakePHP's CommentsFixture. How do you run tests?

skie commented 8 years ago

I pushed phpunit.xml.dist file. Copy this file to phpunit.xml locally. Check env for oracle driver setup and configre it properly for your database connection. Tests you can run using command "phpunit". You dont need to pass bootsrap file as param as it will configured by phpunit.xml file..