CakeDC / cakephp-oracle-driver

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

CalcCodeFixture don't create Oracle Package. #4

Closed hisame64 closed 8 years ago

hisame64 commented 8 years ago

I run tests/TestCase/ORM/MethodTest.php , an error have occurred.

[vagrant@localhost public]$ vendor/bin/phpunit --bootstrap ./tests/bootstrap.php tests/TestCase/ORM/MethodTest.php 
PHPUnit 5.2.9 by Sebastian Bergmann and contributors.

E                                                                   1 / 1 (100%)

Time: 2.02 seconds, Memory: 5.75Mb

There was 1 error:

1) CakeDC\OracleDriver\Test\TestCase\ORM\MethodTest::testMethodCall
Cake\Database\Exception: Cannot describe CALC.SUM. Method not found.

/home/dev/public/src/Database/Schema/MethodsCollection.php:111
/home/dev/public/src/ORM/Method.php:125
/home/dev/public/src/ORM/Request.php:49
/home/dev/public/src/ORM/Method.php:232
/home/dev/public/tests/TestCase/ORM/MethodTest.php:30

FAILURES!
Tests: 1, Assertions: 0, Errors: 1.

I run this test again after I created calc package, this test is success.

[vagrant@localhost public]$ vendor/bin/phpunit --bootstrap ./tests/bootstrap.php tests/TestCase/ORM/MethodTest.php 
PHPUnit 5.2.9 by Sebastian Bergmann and contributors.

.                                                                   1 / 1 (100%)

Time: 2.76 seconds, Memory: 6.25Mb

OK (1 test, 5 assertions)

I think CalcCodeFixture don't create Oracle Package.

skie commented 8 years ago

Seems issue that you did not have phpunt.xml Calc code fixture executed properly on our test env. Please ensure you are passing correct Connection class (OracleConnection) in env.