# |
Jul 20th 2009, 14:29 |
alkemann |
wasnt the problem. got to tinker a little bit :) |
# |
Jul 20th 2009, 14:28 |
gwoo |
alkemann: yeah it should be same order as in actsAs |
# |
Jul 20th 2009, 14:21 |
alkemann |
my drafted is getting in the way of my revision.. |
# |
Jul 20th 2009, 14:21 |
alkemann |
behaviour are called in the order they are declared in the actsAsd right? |
# |
Jul 20th 2009, 13:12 |
nicd |
ok |
# |
Jul 20th 2009, 13:12 |
gwoo |
nicd: ask in #cakephp |
# |
Jul 20th 2009, 13:12 |
nicd |
gwoo, i got it in config/routes.php file right |
# |
Jul 20th 2009, 13:12 |
markstory |
alkemann: yeah, I guess it depends if you have to repeat that save() process anywhere. |
# |
Jul 20th 2009, 13:12 |
nicd |
done |
# |
Jul 20th 2009, 13:11 |
gwoo |
nicd: join #cakephp |
# |
Jul 20th 2009, 13:11 |
alkemann |
markstory: imho the controller is still thin as long it is controller stuff spread over a few more lines |
# |
Jul 20th 2009, 13:10 |
nicd |
how can i define the default page to load first |
# |
Jul 20th 2009, 12:55 |
markstory |
or something with a less stupid name. |
# |
Jul 20th 2009, 12:55 |
markstory |
so Article->saveBigTime() |
# |
Jul 20th 2009, 12:55 |
markstory |
can always make a method that wraps up all the save() calls. |
# |
Jul 20th 2009, 12:51 |
alkemann |
but maybe ur right that it would work |
# |
Jul 20th 2009, 12:51 |
alkemann |
also need to set the pagenumber to 0 specifically |
# |
Jul 20th 2009, 12:50 |
ADmad |
*too |
# |
Jul 20th 2009, 12:50 |
ADmad |
ok.. though behaviors will run on ArticlePage is using saveAll to |
# |
Jul 20th 2009, 12:49 |
alkemann |
the extra couple lines only makes the code more readable. no real benefit from using saveAll |
# |
Jul 20th 2009, 12:48 |
alkemann |
making sure behaviours are run on the Article Page to create a revision |
# |
Jul 20th 2009, 12:47 |
alkemann |
there was a reason i didnt do that.. hmm. |
# |
Jul 20th 2009, 12:47 |
ADmad |
alkemann: can we/should we make saving Article and Intro atomic (ie saveAll) ? |
# |
Jul 20th 2009, 12:46 |
alkemann |
hopefully it will help other developers see how it's intended to work and make sure they dont break it ;) |
# |
Jul 20th 2009, 12:45 |
alkemann |
atm revision makes revisions when a page is accepte. i think changing the order in the model may fix it |
# |
Jul 20th 2009, 12:45 |
markstory |
more of a functional / acceptance test. |
# |
Jul 20th 2009, 12:44 |
alkemann |
markstory: not exactly a "unit" test, but it works well for making sure my behaviours are working together |
# |
Jul 20th 2009, 12:44 |
Phally |
hmm yes indeed |
# |
Jul 20th 2009, 12:44 |
alkemann |
that would be good as well |
# |
Jul 20th 2009, 12:44 |
alkemann |
Phally: or maybe your thinking of a controller test, where you make sure u only correct user can run an acction |
# |
Jul 20th 2009, 12:43 |
markstory |
neat |
# |
Jul 20th 2009, 12:43 |
alkemann |
Phally: right. 2nd last test tests direct edit. checking for permission for doing this would be a seperate test |
# |
Jul 20th 2009, 12:42 |
Phally |
alkemann: yeah, but i mean an article will be published immediately when he is an accepter author i.e. |
# |
Jul 20th 2009, 12:41 |
alkemann |
last test |
# |
Jul 20th 2009, 12:41 |
alkemann |
markstory: ^ |
# |
Jul 20th 2009, 12:41 |
alkemann |
http://thechaw.com/bakery/source/branches/2.0/tests/cases/models/article_page.test.php |
# |
Jul 20th 2009, 12:41 |
alkemann |
as per unit testing pattern. permissions would belong in a seperate test |
# |
Jul 20th 2009, 12:41 |
markstory |
testing flows? |
# |
Jul 20th 2009, 12:41 |
alkemann |
Phally: it's far from done. |
# |
Jul 20th 2009, 12:41 |
Phally |
alkemann: yeah, i realised that, building a site without a site |
# |
Jul 20th 2009, 12:40 |
alkemann |
beats inventing shit and F5 with debug(); |