# |
Jul 19th 2017, 12:01 |
neon1024 |
Well if anyone has any ideas, please let me know. Think I’ll eat lunch and delete the test as it doesn’t seem possible |
# |
Jul 19th 2017, 11:58 |
neon1024 |
The query objects `__debugInfo()` can pickup the contains array correctly, but it seems to be restricted to the objects internal scope, as any attempt to retrieve it from the calling scope returns an empty array |
# |
Jul 19th 2017, 11:56 |
neon1024 |
Is anyone able to help me with testing my behaviours beforeFind? I can’t crack it after 1.5 days trying. This is where I’m at, https://pastebin.com/Wgj6G7gQ which fails as the contain array is empty, but the beforeFind callback is being executed |
# |
Jul 19th 2017, 11:50 |
Ecorce |
Wonderful, thanks :) |
# |
Jul 19th 2017, 11:49 |
hmic |
yes. |
# |
Jul 19th 2017, 11:49 |
Ecorce |
so the initial AppController in src/Controller/ won't be executed ? |
# |
Jul 19th 2017, 11:49 |
hmic |
create the file, extend it. done |
# |
Jul 19th 2017, 11:48 |
hmic |
Ecorce, yes. |
# |
Jul 19th 2017, 11:48 |
Ecorce |
- src/Controller/Api/AppController.php |
# |
Jul 19th 2017, 11:48 |
Ecorce |
In Cakephp 3.x, can a prefix folder get its own AppController, like this : |
# |
Jul 19th 2017, 11:48 |
neon1024 |
Anyone know how to get the contained associations from a query object? I’ve tried `$query->contain()` `$query->getEagerLoader()->contain()` |
# |
Jul 19th 2017, 11:47 |
VersadrillCanada |
hi |
# |
Jul 19th 2017, 11:47 |
Ecorce |
Hello everyone |
# |
Jul 19th 2017, 11:34 |
cakephp869 |
I'd like to insert directly in db |
# |
Jul 19th 2017, 11:33 |
cakephp869 |
how cake calculate the password? |
# |
Jul 19th 2017, 11:33 |
cakephp869 |
now I have to insert a huge list of user |
# |
Jul 19th 2017, 11:33 |
cakephp869 |
but now yes |
# |
Jul 19th 2017, 11:33 |
adriencs |
Cake 2 ? |
# |
Jul 19th 2017, 11:32 |
cakephp869 |
when I insert a user in my app I use AuthComponent::password to save an hash passord in DB |
# |
Jul 19th 2017, 11:32 |
cakephp869 |
I have to insert a list of users |
# |
Jul 19th 2017, 11:32 |
cakephp869 |
hi all |
# |
Jul 19th 2017, 11:16 |
adriencs |
can you set a remote Datasource in app.php ? |
# |
Jul 19th 2017, 11:04 |
neon1024 |
`1) ExitLinks\Tests\Model\Behavior\GoodbyeBehaviorTest::testBeforeFindContain Cake\Database\Exception: Cannot describe articles. It has 0 columns.` |
# |
Jul 19th 2017, 11:04 |
neon1024 |
Well converting from MySQL to SQLite has thrown up an interesting one |
# |
Jul 19th 2017, 11:02 |
neon1024 |
I go from one failed test implementation to another, and I hit a roadblock in every attempt |
# |
Jul 19th 2017, 10:57 |
neon1024 |
Testing the query class feels like it should be easier than this |
# |
Jul 19th 2017, 10:57 |
neon1024 |
I’m finding this very frustrating :( |
# |
Jul 19th 2017, 10:49 |
admad |
You don't need mysql, can just use sqlite with in memory db, which is default |
# |
Jul 19th 2017, 10:46 |
neon1024 |
Guess I’ll have to take the hit and add MySQL and Fixtures as a dependancy to my test suite :( |
# |
Jul 19th 2017, 10:42 |
neon1024 |
Actually I could go look that up, rather than be lazy. |
# |
Jul 19th 2017, 10:42 |
neon1024 |
Is the `beforeFind` event only actually fired when the query is executed? |
# |
Jul 19th 2017, 10:36 |
dangnhutranluong |
hope to learn from you |
# |
Jul 19th 2017, 10:35 |
dangnhutranluong |
i'm a newbie! |
# |
Jul 19th 2017, 10:35 |
dangnhutranluong |
hi! |
# |
Jul 19th 2017, 10:31 |
neon1024 |
I have a strange problem. I’m trying to assert on the contains array in a query instance. When I var_dump it, the `__debugInfo` create a public property of `$eagerLoader->contain()` which shows the array I’m expecting. However when I `var_dump($query->getEagerLoader()->contain()` it’s empty, what am I missing? |
# |
Jul 19th 2017, 10:30 |
neon1024 |
Blimey that’s a beast @dereuromark will have to find some time to read it later :slightly_smiling_face: |
# |
Jul 19th 2017, 10:20 |
adithya |
Authentication for mobile and web, couldn't get cakes users to work! Any other plugins that provide the same features ? Just authentication with social is also fine :grinning: will do the authorisation |
# |
Jul 19th 2017, 10:19 |
dereuromark |
Some good stuff :slightly_smiling_face: https://www.sitepoint.com/poka-yoke-saving-projects-with-hyper-defensive-programming/ |
# |
Jul 19th 2017, 10:15 |
graziel |
how do you spoof user input for shell tests? ive ended up using `$input = new ConsoleInput("data://text/plain,shell_test@test.com\ntest\ntest\ny");` but it feels wrong |
# |
Jul 19th 2017, 10:09 |
neon1024 |
`@return ¯\_(ツ)_/¯` :P |
# |
Jul 19th 2017, 10:09 |
neon1024 |
No more `@return mixed` WOOT! |