# |
Jul 24th 2018, 14:27 |
lubos |
I mean list of implemented events, in this case with Email / Mailer classes |
# |
Jul 24th 2018, 14:26 |
itmpls |
@lubos you mean the order? |
# |
Jul 24th 2018, 14:25 |
lubos |
Is there any doc where I can find all events used in cake core? I mean i know Model, Controller, View events such as afterSave, afterRenderFile, ... but are there any others I could use like Email.afterSend? |
# |
Jul 24th 2018, 14:14 |
turkles |
I have an association which uses through. I have set up my data which looks great before the save(), and if I debug the save() itself I can see the data I am trying to save. But my joining table is still empty and I see no errors - anyone have some ideas of what I can look for ? |
# |
Jul 24th 2018, 13:58 |
drollie |
How do I see the raw request that gets sent after I call $this->get ? |
# |
Jul 24th 2018, 13:57 |
drollie |
On the second request, the server does not receive the cookie and am not sure if it is an issue with the cookie, or if I need to call $this->cookie before my second call, including the cookie which was returned by the server on the first request |
# |
Jul 24th 2018, 13:56 |
drollie |
I make the first request and the server sets the cookie in the reseponse. I would like to make a second request, ensuring the cookie gets included like a browser would, and I am not certain if I need to call $this->cookie() or if it should do this automatically when I call $this->get a second time in the same test function. |
# |
Jul 24th 2018, 13:55 |
drollie |
I make 2 $this->get requests in 1 function and wanted to know the behavior so I can dupllicate what a browser would do |
# |
Jul 24th 2018, 13:55 |
neon1024 |
Two tests. |
# |
Jul 24th 2018, 13:55 |
neon1024 |
SecondRequestWithoutCookie |
# |
Jul 24th 2018, 13:55 |
neon1024 |
SecondRequestWithCookie |
# |
Jul 24th 2018, 13:55 |
neon1024 |
No, new test. |
# |
Jul 24th 2018, 13:54 |
drollie |
function |
# |
Jul 24th 2018, 13:54 |
drollie |
no, same test |
# |
Jul 24th 2018, 13:54 |
neon1024 |
As the cookie not being sent on a subsequent request is a new test |
# |
Jul 24th 2018, 13:54 |
drollie |
the cookie does not seem to get set automatically when I make a second request... |
# |
Jul 24th 2018, 13:54 |
neon1024 |
I would think you should ensure that it’s sent |
# |
Jul 24th 2018, 13:54 |
drollie |
yes, integration test |
# |
Jul 24th 2018, 13:54 |
neon1024 |
It’s an integration test |
# |
Jul 24th 2018, 13:53 |
drollie |
If I make the request a second time, will the cookie be sent to the server, or do I need to call $this->cookie() to set it before making additional requets? |
# |
Jul 24th 2018, 13:53 |
neon1024 |
Then it isn’t a unit test ;) |
# |
Jul 24th 2018, 13:53 |
drollie |
In my controller unit test, I make a request to the server which sets a cookie: $this->get(... |
# |
Jul 24th 2018, 13:32 |
lubos |
Another Mailer question, in the Mailer method the `send` is executed I would say magically. How can I check send was successful? Should I call send manually and do condition like `if ($this->send()) ...` ? |
# |
Jul 24th 2018, 11:24 |
willem |
also, it is working when i run the command on the command line, only from Cake i get this error |
# |
Jul 24th 2018, 11:24 |
lubos |
@edgaras.jan works like a dream, thanks for hint. Not sure if right concept though :slightly_smiling_face: |
# |
Jul 24th 2018, 11:22 |
willem |
i did, but i do not quite understand, something with memory, but do not get why it is working locally |
# |
Jul 24th 2018, 11:21 |
admad |
google it :slightly_smiling_face: |
# |
Jul 24th 2018, 11:16 |
willem |
using CakePDF to render to PDF using wkhtmltoPDF works great on my local machine. on testserver environment online i get this error ``` 'std::bad_alloc' what(): std::bad_alloc Aborted " when executing command "/usr/local/bin/wkhtmltopdf --quiet --print-media-type ``` what does this mean? |
# |
Jul 24th 2018, 11:16 |
lubos |
Ah, clever. will give it a try |
# |
Jul 24th 2018, 11:14 |
edgaras.jan |
then call $email->setSubject('abc') from view |
# |
Jul 24th 2018, 11:13 |
edgaras.jan |
You could set Email as view var $email = new Email(); $email->set(['email' => $email]); |
# |
Jul 24th 2018, 11:12 |
lubos |
Should I write and use custom viewRender? |
# |
Jul 24th 2018, 11:08 |
lubos |
My aim is to parse data (using Text insert) for subject and email body |
# |
Jul 24th 2018, 11:07 |
lubos |
When I use Mailer class, is it possible to set subject from template? Something like $this->setLayout('abc')... |
# |
Jul 24th 2018, 10:37 |
neon1024 |
Yes, I’m on PHP Storm 2018.1 |
# |
Jul 24th 2018, 10:37 |
dereuromark |
not sure if other ides support this meta file |
# |
Jul 24th 2018, 10:36 |
dereuromark |
because this magic is phpstorm specific ( https://github.com/dereuromark/cakephp-ide-helper/blob/master/src/Generator/PhpstormGenerator.php ) |
# |
Jul 24th 2018, 10:35 |
neon1024 |
Will do that now, thanks :thumbsup: |
# |
Jul 24th 2018, 10:35 |
neon1024 |
Oh right, I haven’t run the helper plugin in a while |
# |
Jul 24th 2018, 10:35 |
dereuromark |
you use phpstorm? |
# |
Jul 24th 2018, 10:35 |
dereuromark |
https://github.com/dereuromark/cakephp-ide-helper/blob/master/src/Generator/Task/TableFinderTask.php#L57 |