Log message #4179137

# At Username Text
# Mar 11th 2019, 11:48 neon1024 Newer versions cause issues with the FixtureInjection event in the config
# Mar 11th 2019, 11:48 alexdd55 oh wth
# Mar 11th 2019, 11:47 neon1024 https://github.com/cakephp/app/blob/master/composer.json#L19
# Mar 11th 2019, 11:47 neon1024 You’ve got the wrong PHPUNIT :slightly_smiling_face:
# Mar 11th 2019, 11:47 alexdd55 using cake 3.6
# Mar 11th 2019, 11:47 alexdd55 7.
# Mar 11th 2019, 11:47 neon1024 Using CakePHP 3.7.x
# Mar 11th 2019, 11:47 neon1024 Or 7
# Mar 11th 2019, 11:47 neon1024 Not 8
# Mar 11th 2019, 11:47 neon1024 ..with phpunit 6 I’d imagine
# Mar 11th 2019, 11:46 neon1024 ..with an existing `phpunit.xml` config
# Mar 11th 2019, 11:46 neon1024 With `vendor/bin/phpunit`
# Mar 11th 2019, 11:46 neon1024 You’re testing a whole cake application I guess right?
# Mar 11th 2019, 11:45 neon1024 Config is a little different for plugins, which is what I’m working on now ;)
# Mar 11th 2019, 11:45 neon1024 Should be okay then if it matches the repo i’d imagine
# Mar 11th 2019, 11:44 alexdd55 what shout i set there else then: ``` require dirname(__DIR__) . '/vendor/autoload.php'; require dirname(__DIR__) . '/config/bootstrap.php'; $_SERVER['PHP_SELF'] = '/';```
# Mar 11th 2019, 11:43 alexdd55 >That’s /tests/bootstrap.php
# Mar 11th 2019, 11:43 neon1024 Can you share with us the exact error output
# Mar 11th 2019, 11:43 neon1024 Also, how do you know the connection is not working? Where are you seeing an error? Which part of your code
# Mar 11th 2019, 11:42 neon1024 That’s /tests/bootstrap.php
# Mar 11th 2019, 11:42 neon1024 Have you told your test suite to use the ‘test’ connection?
# Mar 11th 2019, 11:42 neon1024 Configured the test datasource in /config/app.php and setup the correct connection in bootstrap?
# Mar 11th 2019, 11:42 alexdd55 test connection entry is there
# 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