# |
May 17th 2018, 14:37 |
neon1024 |
File uploaded https://cakesf.slack.com/files/U1BT622HW/FARNZEAN9/serverrequest-_-_getpath.sh / https://slack-files.com/T053DPNCM-FARNZEAN9-78f92ff6bd |
# |
May 17th 2018, 14:37 |
jeremyharris |
yes when manually setting properties on entity associations you need to mark it as dirty |
# |
May 17th 2018, 14:37 |
Diego_ |
even if the nested associated data is marked as dirty |
# |
May 17th 2018, 14:37 |
jeremyharris |
ooooh my gosh Diego I can’t believe I missed that :( sorry |
# |
May 17th 2018, 14:36 |
Diego_ |
so i have to set the dirty property for associated entity: $main_entity->setDirty('associated_entity_property', true); |
# |
May 17th 2018, 14:36 |
saeideng |
I tested just now on 3.6.1 |
# |
May 17th 2018, 14:36 |
Diego_ |
hey @jeremyharris i foud the problem for my saving associated, tracking the core ORM i discovered this condition if (!$entity->isDirty($association->getProperty())) |
# |
May 17th 2018, 14:35 |
saeideng |
your url + output |
# |
May 17th 2018, 14:35 |
saeideng |
can I see ? |
# |
May 17th 2018, 14:35 |
neon1024 |
@saeideng Well it’s returning the file extension for me here on 3.6.3 |
# |
May 17th 2018, 14:33 |
saeideng |
not any more |
# |
May 17th 2018, 14:33 |
saeideng |
`$r->here = $r->base + $r->getUri->getPath()` |
# |
May 17th 2018, 14:30 |
neon1024 |
We are all waiting to find out |
# |
May 17th 2018, 14:30 |
saeideng |
>Does the ServerRequest::getUri::getPath() include the file extension? |
# |
May 17th 2018, 14:28 |
mdunham |
Why was cakefest canceled |
# |
May 17th 2018, 14:25 |
neon1024 |
Does the ServerRequest::getUri::getPath() include the file extension? |
# |
May 17th 2018, 14:05 |
neon1024 |
I’m keen to read @savant article about it |
# |
May 17th 2018, 13:54 |
jeremyharris |
not that I am aware of |
# |
May 17th 2018, 13:53 |
itmpls |
any venue for next year? |
# |
May 17th 2018, 13:53 |
itmpls |
aw |
# |
May 17th 2018, 13:52 |
jeremyharris |
yes, unfortunately. it’ll be back next year bigger and better :slightly_smiling_face: |
# |
May 17th 2018, 13:51 |
itmpls |
so cakefest is officially cancelled? :( |
# |
May 17th 2018, 13:50 |
jeremyharris |
it sets up the dependencies, and tests the component directly |
# |
May 17th 2018, 13:50 |
jeremyharris |
here’s an example of a core unit test for a component: https://github.com/cakephp/cakephp/blob/master/tests/TestCase/Controller/Component/FlashComponentTest.php |
# |
May 17th 2018, 13:49 |
jeremyharris |
but you should include unit tests as well |
# |
May 17th 2018, 13:49 |
jeremyharris |
ok so if your plugin has no controllers and you want an integration test, then the test_app might be the way to go |
# |
May 17th 2018, 13:49 |
flavius |
forgot to mention its my own written component and its in a plugin |
# |
May 17th 2018, 13:48 |
jeremyharris |
that is more “unit’ than loading it into a controller or test app. that would be a good integration test, but is much more difficult to set up and might be covered already in existing integration tests that use controllers that use the component |
# |
May 17th 2018, 13:47 |
jeremyharris |
I usually test the component directly |
# |
May 17th 2018, 13:47 |
flavius |
@jeremyharris got a question for you, I'm a noob at unit testing, say i want to test a component, do i need to make a test app which loads said component or can i just go through that component code if statement by if statement, for 100% coverage? |
# |
May 17th 2018, 13:45 |
jeremyharris |
so replace $this with $routes I think |
# |
May 17th 2018, 13:45 |
jeremyharris |
that was copy/pasted from the routes |
# |
May 17th 2018, 13:45 |
sibusiso_slack |
Thanks @jeremyharris, I will implement this in the controller. It throws all kinds of errors when I try to do it in the routes.php config file. |
# |
May 17th 2018, 13:37 |
jeremyharris |
(those are the fallbacks that are set with `->fallbacks()` |
# |
May 17th 2018, 13:37 |
jeremyharris |
if you are using DashedRoute as your default route, then you’ll only need to add ``` $this->connect('/:controller', ['action' => 'index'])->setHost('app.domain.test'); $this->connect('/:controller/:action/*')->setHost('app.domain.test'); ``` |
# |
May 17th 2018, 13:36 |
jeremyharris |
@sibusiso_slack the easiest solution might be to just implement the fallbacks yourself and set their hosts |
# |
May 17th 2018, 13:22 |
slackebot |
Please could someone help me here. I need to match the fallback routes in a subdomain. How do I do this correctly? |
# |
May 17th 2018, 13:22 |
sibusiso_slack |
File uploaded https://cakesf.slack.com/files/UARLT8J5B/FASDYCRM4/route_config.php / https://slack-files.com/T053DPNCM-FASDYCRM4-a3fcfeb129 - Good day, |
# |
May 17th 2018, 13:04 |
jeremyharris |
heh thanks |
# |
May 17th 2018, 13:04 |
birdy247 |
This @admad was pointing at me ;), your a good egg @jeremyharris |
# |
May 17th 2018, 13:03 |
jeremyharris |
I’ll keep that in mind ;) |