Commit Graph

16 Commits

Author SHA1 Message Date
Tim Almdal
f1eec57221 Add a weight column to the items model. Change the album ordering to
use this as the default instead of id.  This prepares the way for
manual reordering in the organize functionality.
2009-04-05 16:57:51 +00:00
Tim Almdal
961d5e11cf Fix unit tests where the albums, resizes and thumbs directory were
being deleted.
Fix for ticket #182
2009-03-25 15:22:23 +00:00
Tim Almdal
ee2407cde2 Fix the test failures. If albums are created manually instead of
calling album::create, then the default sourt column needs to be set
to id.
2009-03-11 00:41:51 +00:00
Andy Staudacher
4757126acc Fix ORM MPTT tests for MySQL strict mode (can't omit Iten type in inserts, it doesn't have a default value). 2009-01-11 05:09:06 +00:00
Bharat Mediratta
5713e3c66e Change photo::create() and album::create() to take ORM instances
instead of ids.
2008-12-23 04:36:09 +00:00
Bharat Mediratta
bf7ab8904a Change ORM_MPTT::add_to_parent() to take an ORM instead of an id so
that it's consistent with ORM_MPTT::move_to()
2008-12-07 08:46:44 +00:00
Bharat Mediratta
055aa04497 Rename moveTo to move_to and extend the test a bit. 2008-12-07 08:23:22 +00:00
Tim Almdal
8d1790a0b4 * Add a moveTo unit test
* Pass the module::event(..., $data) by reference to the handlers
2008-12-05 04:56:33 +00:00
Bharat Mediratta
375e7c675e Implement ORM_MPTT::delete() properly.
Inline ORM_MPTT::_grow() for now
Rewrite ORM_MPTT tests to be domain specific; they no longer use album/photo helpers.
2008-12-04 05:47:05 +00:00
Bharat Mediratta
24cbff29cc Replace grow_test and constrict_test with add_hierarchy_test and
delete_hierarchy_test.

Our tests will be more robust if we test the public API and not the
internal private functions.  If we get to the point where we have to
test the private functions, we should probably move those functions
into their own separate class with a public API.
2008-12-04 05:15:21 +00:00
Tim Almdal
5c095cbd78 Add unit tests to test growing and contracting the left and right pointers
Added a delete method to ORM_MPTT that contracts the tree when an item is deleted
2008-12-04 01:12:44 +00:00
Tim Almdal
6fd261c8b0 Add unittest and caching for ORM_MTPP::descendants 2008-11-20 06:05:22 +00:00
Tim Almdal
604e58346b Add unittest and caching to ORM_MTPP::descendants_count 2008-11-20 05:06:24 +00:00
Bharat Mediratta
936decb437 Add children_count() to ORM_MPTT 2008-11-07 06:46:38 +00:00
Bharat Mediratta
e44ff9bb60 ORM_MPTT::parents() should not include the node itself. 2008-11-05 07:47:19 +00:00
Bharat Mediratta
212e6a0778 New tests for the ORM_MPTT class. 2008-11-04 23:16:42 +00:00