Commit Graph

62 Commits

Author SHA1 Message Date
Bharat Mediratta
4a417708f0 Kohana::show_404() -> throw new Kohana_404_Exception() 2009-11-25 13:51:33 -08:00
Tim Almdal
2a21f3bc80 Only install and activate modules that have tests to run. 2009-10-28 11:37:05 -07:00
Tim Almdal
703f22abcb Only look for tests that are in the active modules. Update the controller golden file to reflect the current location of files. 2009-10-23 09:41:33 -07:00
Tim Almdal
94cd07805d Change the gallery_unit test to only intall into the test environment, modules that are active in the non-test environment. 2009-10-23 07:49:14 -07:00
Bharat Mediratta
79754c2ef4 Run 'graphics::choose_default_toolkit();' to pick a toolkit, which we
normally do as part of a regular install.
2009-09-02 11:53:10 -07:00
Bharat Mediratta
0157ed4cfe Update test code to match the change made in 47810c9aec
where we adjust the site_domain in config.php
2009-06-10 00:53:16 -07:00
Bharat Mediratta
20a2d9f9a8 Reset the cascading file path properly before reinstalling. 2009-05-28 20:59:23 -07:00
Bharat Mediratta
3da5ee2f4c Print out exception traces for most errors 2009-05-28 18:21:39 -07:00
Bharat Mediratta
5e7cc75a29 Convert a few more references of APPPATH to MODPATH/gallery 2009-05-27 16:29:33 -07:00
Bharat Mediratta
88a3d43ba9 Update all references to the core application to now point to the
gallery module.  This type of mass update is prone to some small bugs.
2009-05-27 16:17:29 -07:00
Bharat Mediratta
7aed923908 Restructure the module lifecycle.
Install: <module>_installer::install() is called, any necessary tables
are created.

Activate: <module>_installer::activate() is called.  Module
controllers are routable, helpers are accessible, etc.  The module is
in use.

Deactivate: <module>_installer::deactivate() is called.  Module code
is not accessible or routable.  Module is *not* in use, but its tables
are still around.

Uninstall: <module>_installer::uninstall() is called.  Module is
completely removed from the database.

Admin > Modules will install and activate modules, but will only
deactivate (will NOT uninstall modules).
2009-05-26 05:28:59 +00:00
Bharat Mediratta
29e8bd5230 Fix security preambles 2009-05-18 03:55:34 +00:00
Bharat Mediratta
c87c6f6859 There's a new view for CLI unit test output in the Unit_Test library 2009-05-18 00:16:37 +00:00
Bharat Mediratta
5495037a3d Gee it's May already. Update copyright to 2009. 2009-05-13 20:04:58 +00:00
Bharat Mediratta
61d8a143ea Rejigger the way we do reinstalls while Kohana is running.
core_installer::install() now takes an $initial_install param that
allows us to enforce that we're doing a clean install.  Use this in
both the scaffolding and the unit test code.

Greatly simplify the scaffolding uninstall/reinstall code.
2009-03-19 02:35:51 +00:00
Bharat Mediratta
8dd24edf73 Fix correctness issue if there are no tables (list_tables will return null)
Clean out the module caches directly now that the module loading robustness code is gone.
2009-03-17 18:16:54 +00:00
Andy Staudacher
41600a982f Fix bootstrap / installation issue for unit test framework:
Install user module before installing other modules. E.g. local_import's installation routine depends on the user module to be installed.
2009-02-24 05:27:07 +00:00
Bharat Mediratta
f2cfd9798e Use xxx_test as the default database name. This means that we no
longer have to manually tweak database.php, yay!
2009-01-20 09:40:14 +00:00
Andy Staudacher
fd081159f1 Windows fixes: Use mkdir($path, 0777, true) instead of the unportable system("mkdir -p $path") 2009-01-08 06:57:04 +00:00
Bharat Mediratta
cd1d023754 Change the preamble for views in two ways:
1) drop unnecessary semicolon
2) start with <?php for extra security in the case that the server itself doesn't
   have short_tags enabled (the app won't work, but we need to make sure that we're
   still secure)
2009-01-01 00:23:29 +00:00
Bharat Mediratta
17f77b8de4 Remove module.info from infrastructure modules that are effectively
libraries that would ship with the core.

Refactor welcome.php to use the newly refactored module::available()
2008-12-22 04:49:30 +00:00
Bharat Mediratta
fe27bd1eb3 Change the way that we track modules.
Each module now has a "module.info" file that has information about
the module, including the core.  We can display the installed version,
and the version in the code.

Also take a first shot at a modules admin page.
2008-12-22 03:41:33 +00:00
Bharat Mediratta
05f26fa2d4 Fix a problem with magenta 2008-12-20 22:37:14 +00:00
Bharat Mediratta
34484fb1b5 Dump out the stack trace on errors. 2008-12-16 23:33:43 +00:00
Bharat Mediratta
8bd7afeb5b TEST_MODE always exists now, so check its value, don't rely on its existence to know that we're in test mode. 2008-12-16 05:13:04 +00:00
Bharat Mediratta
02aa98b6e0 Colorize test output 2008-12-16 02:25:47 +00:00
Bharat Mediratta
ee688d1f37 Reload modules *after* we blow away the database to flush out caches 2008-12-13 08:37:41 +00:00
Bharat Mediratta
e12451cf10 Refaactor module::install() and module::uninstall() out of the
scaffolding and unit test code so that we can use it consistently.
This fixes an issue where adding a module was not refreshing the
statically cached module list causing the test framework to break.
2008-12-12 08:41:48 +00:00
Bharat Mediratta
b54b34ed78 Pass list of test dirs into Unit_Test::_constructor() as an argument
instead of modifying the config.
2008-12-12 05:39:06 +00:00
Bharat Mediratta
fa86be7df4 whee, more ascii art 2008-12-11 08:26:27 +00:00
Bharat Mediratta
b0f39497b4 Some minor beautification. 2008-12-08 08:32:44 +00:00
Felix Rabinovich
fb93722e9e moved erro page from unit_test to gallery_unit_test 2008-12-08 08:27:13 +00:00
Bharat Mediratta
80a7db61c9 Fix up the test framework to work now that we're only loading installed modules
via the autoloader.
2008-12-04 08:17:57 +00:00
Bharat Mediratta
a4494b9f9a Put the output in pretty ASCII boxes. 2008-12-03 05:15:03 +00:00
Bharat Mediratta
844e5573f0 Make sure that the dev is not using the same db for tests as they are for production (this one's for you, valiant!) 2008-12-03 03:49:45 +00:00
Bharat Mediratta
705698a425 Drop the database and rm -rf test/var instead of calling uninstall on
all modules.  This guarantees a clean start w/out worrying about
weirdness in the uninstaller code.
2008-12-03 03:44:48 +00:00
Bharat Mediratta
6f959deed9 Rename generic test.php to gallery_unit_test.php to make navigation to this file a little easier 2008-12-03 03:23:30 +00:00
Bharat Mediratta
89c4dadec2 Rename module::get_list() to module::installed() 2008-11-28 18:39:18 +00:00
Tim Almdal
de56a33c9c Clean tag creation 2008-11-26 06:37:12 +00:00
Bharat Mediratta
18ce4a4c1f Actually call uninstall! 2008-11-26 05:43:43 +00:00
Tim Almdal
53f45b3079 Correct call to undefined uninstall_modules method. Should have been _uninstall_modules 2008-11-25 18:00:33 +00:00
Tim Almdal
2c20fed373 Dynamically locate modules to install for test 2008-11-25 15:01:17 +00:00
Tim Almdal
b2af9ed470 Modify the test controller to call tag_installer::install and uninstall
Created the first tag unit test
2008-11-25 07:05:03 +00:00
Tim Almdal
7bcf7efc09 Remove the complexity of a interface driven user management module 2008-11-10 21:29:30 +00:00
Tim Almdal
0a8d5edbdc Early look at the User/Auth module refactoring. It will look for a driver based on the contents of the user/config/user.php file. And load that driver based on the User_Driver interface. There is a default User_Gallery_Driver class that will provide the actual interface implementation. Replacing this driver will allow a completely different user and authentication implementation to be used... hopefully will reduce issues with embedding and other user management systems. Removed from unit tests so they will still run. 2008-11-10 20:17:09 +00:00
Tim Almdal
359e28a50f Remove Auth module 2008-11-10 16:45:06 +00:00
Bharat Mediratta
b006b1922c uninstall and reinstall the comment module, too 2008-11-10 00:26:52 +00:00
Tim Almdal
d025155314 The start of an authentication module. This provides the installation and a basic install test. There is no interface at the moment to do authentication. It is dependent on the install of the user module. 2008-11-08 01:56:59 +00:00
Bharat Mediratta
ef4b125796 Uninstall/reinstall modules in the right order and catch exceptions (fixes test failures) 2008-11-06 03:51:30 +00:00
Tim Almdal
134bac46d0 add installation unit tests and corrected a problem where the groups_users pivot table was not populated. 2008-11-05 22:10:35 +00:00