# |
Mar 11th 2019, 11:42 |
alexdd55 |
database is there |
# |
Mar 11th 2019, 11:42 |
alexdd55 |
yes |
# |
Mar 11th 2019, 11:42 |
alexdd55 |
no logs are created.. no idea how to figure that out |
# |
Mar 11th 2019, 11:42 |
neon1024 |
Have you created the test database? |
# |
Mar 11th 2019, 11:03 |
alexdd55 |
hm.. connection is not working |
# |
Mar 11th 2019, 10:49 |
inoas |
jose_zap / lorenzo - is seatgeek using elasticsearch for its main search? |
# |
Mar 11th 2019, 10:44 |
alexdd55 |
oh sorry.. yeah.. got it.. didn’t read the path |
# |
Mar 11th 2019, 10:43 |
challgren |
https://github.com/cakephp/cakephp/tree/master/src/TestSuite/Fixture |
# |
Mar 11th 2019, 10:42 |
challgren |
Its in cake core |
# |
Mar 11th 2019, 10:42 |
alexdd55 |
what is that fixture injector and manager? can not find an example for that |
# |
Mar 11th 2019, 10:41 |
alexdd55 |
hm… |
# |
Mar 11th 2019, 10:35 |
challgren |
You should copy that to phpunit.xml |
# |
Mar 11th 2019, 10:35 |
challgren |
https://github.com/cakephp/app/blob/master/phpunit.xml.dist |
# |
Mar 11th 2019, 10:34 |
challgren |
but if your fixtureinjector isnt loading correctly the db connection will always fail |
# |
Mar 11th 2019, 10:34 |
alexdd55 |
this is where i got ` // Optional. Set this property to load fixtures to a different test datasource public $connection = ‘test’;`from |
# |
Mar 11th 2019, 10:33 |
challgren |
https://book.cakephp.org/3.0/en/development/testing.html would be the best docs to read |
# |
Mar 11th 2019, 10:33 |
alexdd55 |
thanks.. on it |
# |
Mar 11th 2019, 10:32 |
challgren |
Would be the best spot to look for at basic testing and app setup |
# |
Mar 11th 2019, 10:32 |
challgren |
https://github.com/cakephp/app |
# |
Mar 11th 2019, 10:32 |
challgren |
Im new at the testing side but Its to load the fixtures into the test datasource, its an additional layer on top of phpunit |
# |
Mar 11th 2019, 10:29 |
alexdd55 |
sorry toally new to this |
# |
Mar 11th 2019, 10:29 |
alexdd55 |
@challgren what is the listener for? also have no fixture manager :face_with_monocle: |
# |
Mar 11th 2019, 10:27 |
alexdd55 |
i will check |
# |
Mar 11th 2019, 10:18 |
challgren |
Also make sure your phpunit.xml has listeners setup |
# |
Mar 11th 2019, 10:16 |
slackebot |
<challgren> |
# |
Mar 11th 2019, 10:16 |
challgren |
Is your bootstrap.php in tests/ correct? |
# |
Mar 11th 2019, 10:16 |
alexdd55 |
no matter what i change its always “not found” |
# |
Mar 11th 2019, 10:15 |
challgren |
I have over 100 fixtures and none of mine have any connection set and Im using the default app.php settings |
# |
Mar 11th 2019, 10:15 |
alexdd55 |
its fine |
# |
Mar 11th 2019, 10:14 |
alexdd55 |
i will double check |
# |
Mar 11th 2019, 10:14 |
challgren |
Then something could be wrong like username/password or db doesnt exist |
# |
Mar 11th 2019, 10:14 |
alexdd55 |
even if it would use “default” .. somehow its not finding it |
# |
Mar 11th 2019, 10:13 |
alexdd55 |
don’t wanna use default |
# |
Mar 11th 2019, 10:13 |
alexdd55 |
because it always says “default” was not found.. |
# |
Mar 11th 2019, 10:13 |
challgren |
Why are you adding the connection to the fixture? |
# |
Mar 11th 2019, 10:12 |
alexdd55 |
its already there |
# |
Mar 11th 2019, 10:12 |
challgren |
In your config/app.php look for Datasources and then test |
# |
Mar 11th 2019, 10:08 |
alexdd55 |
any ideas how to dix this? |
# |
Mar 11th 2019, 10:07 |
alexdd55 |
but still get ```App\Test\TestCase\Model\Table\CompaniesTableTest::testInitialize Cake\Datasource\Exception\MissingDatasourceConfigException: The datasource configuration "default" was not found. ``` |
# |
Mar 11th 2019, 10:07 |
alexdd55 |
i add this to the fixture `public $connection = 'test';` |
# |
Mar 11th 2019, 10:05 |
alexdd55 |
but i got stuck with the db connection |