summaryrefslogtreecommitdiff
path: root/core/tests
AgeCommit message (Collapse)Author
2008-12-04Add unit tests to test growing and contracting the left and right pointersTim Almdal
Added a delete method to ORM_MPTT that contracts the tree when an item is deleted
2008-12-03Rename file::unlink() to dir::unlink(). This creates an API that isBharat Mediratta
clearer about its actions, otherwise we may accidentally blow away an entire hierarchy when we think we're deleting a single file (there's a reason why rm won't let you delete dirs that aren't empty!) Name it "dir" instead of "directory" because apparently "directory" is already reserved. Move the delete call out of Items_Controller and into the model. The model is responsible for keeping state integrity, not the controller.
2008-12-03Add a MY_file class that extends the file helper by creating an unlink ↵Tim Almdal
method that deletes a file or an album directory. Modify Items_Controller::_delete to call this new helper method when deleting an item
2008-12-03Implement two testsBharat Mediratta
2008-12-03Test stubsBharat Mediratta
2008-11-271) Create a Theme_View class that combines the functionality of the Theme ↵Tim Almdal
class with the View class. 2) Only define the form.html.php::DrawForm method once if there are multiple forms on the page (i.e. comments and add tags)
2008-11-26Some code audit fixes and adding some directory separator normalization code ↵Andy Staudacher
to make it work on Windows as well.
2008-11-26Initial commit of the translation class, I18n_Core and some tests.Andy Staudacher
- Port of Ruby's I18n gem (http://rails-i18n.org/) - Added proper plural handling on top of that. - Using CLDR 1.6's plural form data - See I18n_Test for example usage. - Not integrated into G3 templates yet. Probably adding __() as alias for I18n::instance->translate(). - No specific plan yet where localization files should live.
2008-11-22* Added test for rest::request_method().Jozef Selesi
* Implemented delete in comment.
2008-11-21Fixed a bug in the REST controller dispatcher and added a test case that ↵Jozef Selesi
excercises it.
2008-11-20Break dispatch tests up into little ones.Bharat Mediratta
2008-11-20Add unittest and caching for ORM_MTPP::descendantsTim Almdal
2008-11-20Limit File_Structure_Test to only apply the regex expression if views is ↵Tim Almdal
contained in the path name.
2008-11-20Add unittest and caching to ORM_MTPP::descendants_countTim Almdal
2008-11-20* Added HTTP status constants and helper functions to REST helper.Jozef Selesi
* HTTP header setting in comment module now going through REST helper API. * Fixed items controller test. * Fixed user installer test. * Fixed _create() handling in the REST controller. * Fixed routing for edit and add forms. * Added some tests for the REST controller. * Set svn:eol-style to LF on a bunch of files. * Added preamble to MY_Forge.php.
2008-11-19Add the original item height and width to the item tableTim Almdal
2008-11-19Change the regex to assert true for files that match the pattern ↵Tim Almdal
"#/views/.*?(\.html|mrss)\.php$#"
2008-11-19Change the view_files_end_in_html_dot_php_test to ↵Tim Almdal
view_files_correct_suffix_test and change it to also accept mrss as a valid suffix
2008-11-19Update the unit test for mime types. Can't test it right now because ↵Bharat Mediratta
routing is broken for the test framework so we have to fix that first.
2008-11-11Updated for recent Item_Controller API changeBharat Mediratta
2008-11-11Reset PasswordHash.php to its original state and exclude it from the ↵Tim Almdal
file_structure_test
2008-11-10Add a test to make sure that we have no windows-style line endings.Bharat Mediratta
2008-11-10Tests for Item_ControllerBharat Mediratta
2008-11-09Rename tests to make room for controller testsBharat Mediratta
Album_Test -> Album_Helper_Test Photo_Test -> Photo_Helper_Test
2008-11-09Implement Item_Controller::put() and delete()Bharat Mediratta
Adjust/simplify photo::create Add image uploading to the scaffolding
2008-11-07Add children_count() to ORM_MPTTBharat Mediratta
2008-11-05* Add thumbnail and resize dimensions to the item table and use themBharat Mediratta
properly in the theme. * Move thumbnail and resize generation down into the model for consistency. * Add a sample thumbnail for albums * Fix a bug in the ORM to clear the cache when we reload an object. * Add Kohana docs to the scaffold.
2008-11-05ORM_MPTT::parents() should not include the node itself.Bharat Mediratta
2008-11-05Change the default theme to actually render what's in the Gallery.Bharat Mediratta
Currently only the album view works, albums have no thumbnails, and there's only 1 image in use. Improved Item_Model to have the following API methods file_path() -- returns the path to the source image or album dir thumbnail_path(), thumbnail_url() -- returns path/url to the thumbnail resize_path(), resize_url() -- returns path/url to the resize All tests updated.
2008-11-05The carousel block is now off into its own module. TheBharat Mediratta
sidebar.html.php file loops over $theme->blocks() which in turn calls carousel::block() which uses the Block object to create a standard block UI. Hooray!
2008-11-05Moved MPTT related tests to ORM_MPTT_TestBharat Mediratta
2008-11-04New tests for the ORM_MPTT class.Bharat Mediratta
2008-11-04Lots of new stuff!Bharat Mediratta
Replace theme HTML with *almost* the latest stuff from the mockups. (it doesn't include r18467 yet). Our theme format is now modelled after WordPress / Habari's style where you have one entry point per type (eg: album.php) which can load up whatever parts it needs (eg: $theme->display("header")) Created album and photo helpers which have create() functions that form the base of our new API, along with tests for them. Created our own version of the ORM_MPTT since the existing versions were too buggy and unsupported to depend upon. Only has a minimal implementation so far, and the tests are not yet committed. Added path(), thumbnail_path() and resize_path() to Item_Model Extended the scaffolding to allow you to add lots of photos/albums into your hierarchy. Deleted modules/mptt -- we're not going to use this anymore.
2008-11-04Add a test to detect tabs in our code, and convert all tabs to spacesBharat Mediratta
so that the test passes.
2008-11-04Restructure the theme code to be more like WordPress / Habari. Now,Bharat Mediratta
the controller initiates a request to a top level page (eg: album.html.php) which is then free to include whatever other page chunks it wants with calls like <?= $theme->display('header.html') ?> Variables like $item and $children are in the global space for all views. theme.php helper is now Theme.php library which lets us store the name of the theme inside the variable itself. This means that the theme does not have to know its own name because you can use $theme->url() for all urls to stuff inside the theme itself, which makes it possible to cline a theme without changing a single line. Still using the mock album UI.
2008-11-03Oops, injecting the function name caused an extra call in the callBharat Mediratta
stack. The test passed, but the actual code failed. Fixed now.
2008-11-03Theme helper. Right now it has one api method, theme::url whichBharat Mediratta
returns a url local to the theme that you're in. For example, if you're in themes/foo/views/page_header.html.php and you call theme::url("images/foo.png") then it'll create a url to: themes/foo/images/foo.png
2008-11-03More bootstrap code.Bharat Mediratta
* core_installer::install now creates the root album and the albums/thumbnails directories under VARPATH. * Add a test for core_installer
2008-11-02Create some basic infrastructure:Bharat Mediratta
* item model (contains basic item info, similar to the gx version) * module model (has info about each module and which version of it is installed) * added a very basic unit test to verify that we can create an instance of item * Updated our test controller to require a unit_test db config and call core::install if it hasn't been done already. New pattern: * core/helpers/core_installer.php creates core_installer helper. When we install a new module you call xxx_installer::install(), and when you want it to go away, you do xxx_installer::uninstall() Create
2008-11-02Ignore view files in no_trailing_closing_php_tag_test since they will ↵Bharat Mediratta
occasionally end in tags like <?= this ?>
2008-11-01Add a test to verify that we have the right preamble on files.Bharat Mediratta
2008-11-01Clean up tests a bit.Bharat Mediratta
2008-11-01Add a new test to verify that view files end in .html.phpBharat Mediratta
2008-11-01Add first test; this verifies that we leave the ?> off at the end of PHP files.Bharat Mediratta