# |
Jul 11th 2017, 16:09 |
ericadeefox |
it requires a stored session, which apparently the way I had been doing it w my integration testing wasn't sufficient. so I go, OK, let's `session_start()` at the top of my tests. nope, it starts the session but then completely ignores the session data I set, like admin stuff, rendering most of my tests useless anyway. RIP perfect tests |
# |
Jul 11th 2017, 16:07 |
jeremyharris |
not sure your use case though, I don’t know anything about the fb sdk or what it expects |
# |
Jul 11th 2017, 16:06 |
jeremyharris |
if it requires it now, I guess so :( I usually have a login() method for my tests that set session data, which would allow setting fb related session data in it as well |
# |
Jul 11th 2017, 16:04 |
ericadeefox |
FB SDK has ruined my integration testing, which has been perfect for past several weeks. erring there is no stored session, so do I need to store specific session data for FB for each test I have that requires session data? |
# |
Jul 11th 2017, 16:02 |
jeremyharris |
the best |
# |
Jul 11th 2017, 16:02 |
jeremyharris |
procrastination! |
# |
Jul 11th 2017, 16:02 |
ericadeefox |
nbd I'm fiercely trying to avoid confronting the 56 errors my tests are throwing me :,( |
# |
Jul 11th 2017, 16:01 |
jeremyharris |
oh man I’m looking at the wrong thing haha |
# |
Jul 11th 2017, 16:01 |
ericadeefox |
I was on here: https://api.cakephp.org/3.0/source-class-Cake.Network.Response.html#652-669 |
# |
Jul 11th 2017, 16:01 |
jeremyharris |
well… https://api.cakephp.org/3.4/source-class-Cake.Http.Client.Response.html#296-305 |
# |
Jul 11th 2017, 16:01 |
jeremyharris |
setter/getter |
# |
Jul 11th 2017, 16:00 |
jeremyharris |
ah |
# |
Jul 11th 2017, 16:00 |
ericadeefox |
it returns it if statusCode() is null, you can use it to set the status tho, I thought |
# |
Jul 11th 2017, 16:00 |
jeremyharris |
gotta use withX methods to create new responses to return |
# |
Jul 11th 2017, 15:59 |
jeremyharris |
withStatus :) I think statusCode returns the status code |
# |
Jul 11th 2017, 15:58 |
ericadeefox |
ahh it's `$this->response->statusCode(200)` it was a hybrid of both our answers :P |
# |
Jul 11th 2017, 15:58 |
jeremyharris |
I think by default the status code is 200, so you can probably just return $this->response |
# |
Jul 11th 2017, 15:57 |
awi |
Everything else I can do by Exceptions |
# |
Jul 11th 2017, 15:57 |
ericadeefox |
it's like `$this->statusCode(200)` |
# |
Jul 11th 2017, 15:57 |
jeremyharris |
I think return $this->response->withStatusCode(200) |
# |
Jul 11th 2017, 15:57 |
awi |
just a 200, no template whatsoever |
# |
Jul 11th 2017, 15:57 |
awi |
How do i return a 200 |
# |
Jul 11th 2017, 15:56 |
rudy1976s |
yes |
# |
Jul 11th 2017, 15:56 |
hmic |
is that a hasMany? |
# |
Jul 11th 2017, 15:56 |
hmic |
you are talking about a node, not a relation |
# |
Jul 11th 2017, 15:55 |
rudy1976s |
Relations belongsTo Nodes |
# |
Jul 11th 2017, 15:54 |
hmic |
so thats a hasMany relation? |
# |
Jul 11th 2017, 15:53 |
rudy1976s |
i tried adding the .node and it results null |
# |
Jul 11th 2017, 15:53 |
hmic |
collections go deep |
# |
Jul 11th 2017, 15:53 |
hmic |
you can do that |
# |
Jul 11th 2017, 15:52 |
rudy1976s |
https://gist.github.com/rudy1976s/5b5af38306c6bbf8d09dc7b5cf0d1284 |
# |
Jul 11th 2017, 15:52 |
rudy1976s |
I have cut down the array because it was too long |
# |
Jul 11th 2017, 15:49 |
rudy1976s |
ok wait |
# |
Jul 11th 2017, 15:49 |
rudy1976s |
I see that I can use dot notation to reach inner values |
# |
Jul 11th 2017, 15:49 |
jeremyharris |
yeah gisting what you’ve got and what you want would be helpful |
# |
Jul 11th 2017, 15:48 |
jeremyharris |
collections sort of figure that out for you |
# |
Jul 11th 2017, 15:48 |
hmic |
or explain your usecase |
# |
Jul 11th 2017, 15:48 |
hmic |
check the docs maybe on what you need to do |
# |
Jul 11th 2017, 15:48 |
hmic |
of course not |
# |
Jul 11th 2017, 15:48 |
rudy1976s |
but i cant use {n} like in hash |
# |
Jul 11th 2017, 15:46 |
rudy1976s |
I tried with collections |