Robert Sesek [Thu, 24 Jan 2008 16:24:51 +0000 (11:24 -0500)]
Do not allow random() to take an array of high or low, just an optional fixed length (otherwise it will randomly select one)
* Functions.php:
(BSFunctions::random): Do not accept an Array as a parameter, just an optional int
* UnitTest/FunctionsTest.php:
(FunctionsTest::testRandom): Test using a fixed length as well as the random length
Robert Sesek [Wed, 23 Jan 2008 22:15:47 +0000 (17:15 -0500)]
Removing the is_browser() function
* Functions.php:
(BSFunctions::is_browser): Removed
(BSFunctions::download_file): Send both application/octet-stream and application/octetstream so we don't need to browser sniff anymore
* UnitTest/FunctionsTest.php: Removed the empty unit test for is_browser()
Robert Sesek [Wed, 23 Jan 2008 20:45:57 +0000 (15:45 -0500)]
We no longer need the ISSO_CHECK_POST_REFERER because we made BSInput::_checkPostReferer() public
* Input.php:
(BSInput::__construct): Remove the code that called _checkPostReferer()
(BSInput::checkPostReferer): Removed the _ from the old name and made it public
Robert Sesek [Mon, 14 Jan 2008 22:04:29 +0000 (17:04 -0500)]
Add sanity checks to BSPrinterNavigation when setting focus or sections
* PrinterNavigation.php
(BSPrinterNavigation::addFocus): Make sure the key is unique and exists before accepting it
(BSPrinterNavigation::addSection): ditto
Robert Sesek [Mon, 14 Jan 2008 20:04:19 +0000 (15:04 -0500)]
Fixing some things in the Printer system
* Printer.php: include PrinterNavigation.php
* PrinterRootElementPage.php:
(BSPrinterRootElementPage::get/setNavigator): Renamed from get/setNavigation()
(BSPrinterRootElementPage::paint): Fix a parse error caused by a missing concat op
Robert Sesek [Mon, 14 Jan 2008 19:41:00 +0000 (14:41 -0500)]
We now pass the installer test again, the issue was that InstallerTest->input wasn't being set. The circular ref to the rig in TestInstallerFixture was also cleaned up
Robert Sesek [Sun, 13 Jan 2008 21:37:31 +0000 (13:37 -0800)]
Removing the BSVariableRegistry and instead making public static vars in BSApp for the necessary inter-linking modules
* Api.php: No longer use BSApp::registry() but rather just the cvars
* App.php: Make the ivars cvars so we no longer need singleton stuff
(BSApp::_instance): Removed
(BSApp::registry): Removed
(BSApp::load_module): Removed, just directly instantiate now
(BSApp::required_modules): Removed
(BSVariableRegistry): Removed
* Input.php: Use cvars instead of the BSApp::registry()
* Installer.php: ditto
* Mail.php: ditto
* Pagination.php: ditto
* Template.php: ditto
Robert Sesek [Sun, 13 Jan 2008 20:43:26 +0000 (12:43 -0800)]
Removing a lot of old system variables from BSApp
* App.php: Removed BSApp->application, BSApp->appPath, BSApp->appVersion, BSApp->webPath
(BSApp::set_application): Removed
(BSApp::get_application): Removed
(BSApp::set_app_path): Removed
(BSApp::get_app_path): Removed
(BSApp::set_app_version): Removed
(BSApp::get_app_version): Removed
(BSApp::set_web_path): Removed
(BSApp::get_web_path): Removed
* Printer.php: Add BSPrinter->copyright to store copyright information for the footer of pages
(BSPrinter::get_copyright): New method
(BSPrinter::set_copyright): New method
* PrinterNavigation.php: BSPrinter->realm is now the only component used for titles
(BSPrinterNavigation::constructHeaderHtml): Now uses only the realm
* PrinterRootElementPage.php: Again, only use BSPrinter->realm
(BSPrinterRootElementPage::paint): Switch to using only the realm in the title and using BSPrinter->copyright in the footer
Robert Sesek [Sun, 13 Jan 2008 18:46:16 +0000 (10:46 -0800)]
Fixing a few functions that broke during the refactoring
* Functions.php:
(BSFunctions::swap_css_classes): This function wasn't marked static so it wasn't refactored, fixed both of those issues
(BSFunctions::scan_directory): Issues arose with _help_scan_directory()
(BSFunctions::_help_scan_directory): ditto
Robert Sesek [Fri, 30 Nov 2007 18:47:12 +0000 (13:47 -0500)]
Fixing some warnings that I discovered through unit testing under E_ALL
* Functions.php:
(BSFunctions::FetchMicrotimeDiff): Refactored the local vars
* Template.php:
(BSTemplate::fetch): Fixed a warning generated by the uncached template counter
(BSTemplate::flush): Fixed a warning about the microtime diff because we weren't passing a microtime, just the seconds
Robert Sesek [Sat, 22 Sep 2007 18:44:56 +0000 (14:44 -0400)]
Fix a failing unit test to work around the file system being slow
* UnitTest/TemplateTest.php:
(TemplateTest::testDbCache): sleep() for a second in order to allow the file system to catch up to the changes we're making
Robert Sesek [Sat, 15 Sep 2007 17:03:44 +0000 (13:03 -0400)]
Added the installer unit test
* Installer.php:
(BSInstaller::__construct): Fixed a bad call to the registry
* UnitTest/AllTests.php: Add the installer test
* UnitTest/InstallerTest.php: New file
Robert Sesek [Thu, 16 Aug 2007 20:51:48 +0000 (20:51 +0000)]
Removing the usage counter in from the template system
* Template.php:
(BSTemplate::cache): No longer initialize the usage counter
(BSTemplate::fetch): Only increment the BSTemplate->uncached[] template counter when the template is not cached
(BSTemplate::flsuh): Remove the template debug block and only show uncached templates and their usage
Robert Sesek [Thu, 16 Aug 2007 20:44:53 +0000 (20:44 +0000)]
Removing the SVN constant option and the ISSO_MT_START (thanks to $_SERVER['REQUEST_TIME'])
* Template.php:
(BSTemplate::flush): No longer display SVN information and we can use $_SERVER[REQUEST_TIME] so we don't need to define ISSO_MT_START
* App.php: Remove documentation about constants
Robert Sesek [Thu, 16 Aug 2007 20:35:59 +0000 (20:35 +0000)]
Simplifying the loading of templates so we don't have two exceptions to throw for the same type of error
* Template.php
(BSTemplate::_loadTemplate): Check if the path is a file and can be read, instead of checking the result of file_get_contents() becaues that way we don't throw multiple exceptions in the same method unnecessarily
Robert Sesek [Wed, 15 Aug 2007 07:06:17 +0000 (07:06 +0000)]
Making the two MySQL tests create an InnoDB database so that we can practice our new transaction test
* UnitTest/DatabaseMySQLTest.php:
(DatabaseMySQLTest::setUp): Create the test table as InnoDB
* UnitTest/DatabaseMySQLiTest.php:
(DatabaseMySQLiTest::setUp): ditto
* UnitTest/DatabaseTestAbstract.php:
(DatabaseTestAbstract::testTransactions): New method
Robert Sesek [Tue, 14 Aug 2007 03:38:41 +0000 (03:38 +0000)]
Changing the registry part of BSRegister to be a new inner class called BSVariableRegistry
* Register.php:
(BSRegister::__construct): Instantiate a new instance of BSVariableRegistry
(BSRegister::Registry): New method
(BSRegister::Register): Removed
(BSRegister::Unregister): Removed
(BSRegister::Get): Removed
(BSRegister::GetType): Removed
(BSRegister::GetAll): Removed
(BSVariableRegistry): New class
* docs/UnitTest/RegisterTest.php: Updated the unit test for the new BSRegister functionality
Robert Sesek [Sat, 28 Jul 2007 17:37:32 +0000 (17:37 +0000)]
Starting to migrate from SimpleTest to PHPUnit.
* docs/UnitTestReport.php: Renamed to SimpleTestReporter
* docs/UnitTest/AllTests.php: Changing the path to the test reporter, see above.
* docs/PHPUnitTestReporter.php: Added