Commit Graph

15 Commits

Author SHA1 Message Date
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
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
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
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
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
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