Commit Graph

135 Commits

Author SHA1 Message Date
Ingo Schommer
de1218e8db ENHANCEMENT Using fixtures in CheckboxSetFieldTest?, restructured from hard-to-debug manymany-join on self to a Article<->Tag relation
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@63995 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-09 14:29:48 +00:00
Sam Minnee
866853f31a BUGFIX: Improved RedirectorPage's handling of invalid configuration options to prevent infinite loops and segfaults
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@63939 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-09 01:46:17 +00:00
Hayden Smith
fc2c16efdf DataObject::write now throws a ValidationException rather than calling user_error if the call to DataObject::validate fails. This allows the validation exception to be caught and handled by tests or other controllers.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@63891 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-08 20:42:09 +00:00
Sam Minnee
b79c0661a4 MINOR: Fix to SiteTreeTest's data fixtures
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@63822 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-08 03:36:12 +00:00
Sam Minnee
51447b89ab BUGFIX: Fixed pagination in TableListField after hsmith's changes
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@63819 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-08 03:32:33 +00:00
Hayden Smith
634ed7b70c Merged from branches/nzct-trunk. Use 'svn log -c <changeset> -g' for full commit message. Merge includes stability fixes and minor refactor of TableListField and ComplexTableField.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@63806 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-08 02:00:12 +00:00
Hayden Smith
2d9fcee4de BUGFIX: Fixed paths to CSV fixtures for case-sensitive file systems.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@63769 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-07 21:20:24 +00:00
Hayden Smith
3fcb8b518c BUGFIX: Fixed $fixture_file for Ext2fs and other case-sensitive file systems.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@63768 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-07 21:19:19 +00:00
Ingo Schommer
f49ed3ee17 ENHANCEMENT Added unit tests for "_unchanged" handling in Form->loadDataFrom()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@63762 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-07 17:44:12 +00:00
Ingo Schommer
1665fd5cf3 ENHANCEMENT Added unit tests for Form->loadDataFrom()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@63761 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-07 17:23:50 +00:00
Ingo Schommer
802317c705 FEATURE Added HTTP method override support to HTTPRequest and Form (through $_POST['_method'] or $_SERVER['X-HTTP-Method-Override']), incl. unit tests
ENHANCEMENT Added Form->FormHttpMethod()
ENHANCEMENT Added HTTPRequest->httpMethod()
ENHANCEMENT Added HTTPRequest::detect_method()

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@63679 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-06 14:58:01 +00:00
Ingo Schommer
eff1f50041 ENHANCEMENT Added RequestHandlingTest->testNestedBase()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@63650 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-05 19:21:35 +00:00
Ingo Schommer
21859d3d97 ENHANCEMENT Added FieldSet->hasTabSet() incl. unit test
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@63628 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-03 18:29:43 +00:00
Ingo Schommer
d909754999 ENHANCEMENT Added ObjectTest->testSingletonCreation()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@63619 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-03 15:57:32 +00:00
Ingo Schommer
b7d56b9e8a ENHANCEMENT Added FieldSetTest->testRemoveTab()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@63615 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-03 15:55:14 +00:00
Sam Minnee
cbc228f9a2 API CHANGE: Created CSVParser class and updated CSVBulkLoader to use it
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@63563 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-03 00:27:58 +00:00
Sam Minnee
cba8e71170 ENHANCEMENT: Added support for dot syntax to DataObject::update()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@63493 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-02 00:45:13 +00:00
Sam Minnee
ca884b809d BUGFIX #2753: Couldn't have fields named the same as methods
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@63432 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-01 00:55:25 +00:00
Ingo Schommer
0c4681eb81 MINOR todos for DataObjectTest
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@63339 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-09-30 00:27:22 +00:00
Ingo Schommer
bf896a2cfd API CHANGE Deprecated DataObject->fieldExists() - please use hasField(), hasDatabaseField(), hasOwnTableDatabaseField()
ENHANCEMENT Added DataObject->hasOwnTableDatabaseField(), replaced legacy usage of fieldExists()
ENHANCEMENT Renamed cached static "fieldExists" to "_cache_hasOwnTableDatabaseField"
ENHANCEMENT Added DataObjectTest test cases for checking various field existence levels
API CHANGE Deprecated DataObject->listOfFields() - use custom code instead

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@63337 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-09-30 00:20:30 +00:00
Sam Minnee
2af039785c ENHANCEMENT: Updated cli-script handling to be more in line with web calls, and improved Director::setBaseURL() calls.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@63321 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-09-29 23:41:50 +00:00
Ingo Schommer
c4a47f1def MINOR Reverted accidental disabling of ManifestBuilderTest cleanup code
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@63156 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-09-27 16:55:42 +00:00
Ingo Schommer
b8846a9ab3 MINOR Temporarily disabled RSSFeedTest as its overriding environment variables that should be handled by Director class with Director::setBaseURL() (which is currently not fully working). Added stub-tests for Director.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@63155 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-09-27 16:04:01 +00:00
Ingo Schommer
9371f4688b ENHANCEMENT Introduced constants for system paths like /sapphire in preparation for a more flexible directory reorganisation. Instead of hardcoding your path, please use the following constants: BASE_PATH, BASE_URL, SAPPHIRE_DIR, SAPPHIRE_PATH, CMS_DIR, CMS_PATH, THIRDPARTY_DIR, THIRDPARTY_PATH, ASSETS_DIR, ASSETS_PATH, THEMES_DIR, THEMES_PATH
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@63154 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-09-27 16:02:38 +00:00
Sam Minnee
1be18b792c EHANCEMENT #2853 - You can now use db/build instead of db/build?flush=1
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@63020 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-09-25 00:03:09 +00:00
Ingo Schommer
65e9165905 BUGFIX Allowing HTTPRequest::match() to match rules with extensions (e.g. /sitemap.xml used for GoogleSitemap)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@62471 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-09-16 20:37:46 +00:00
Ingo Schommer
c57ce5f1a4 FEATURE Formatting MySQL error messages with newlines through new SQLFormatter class (used in MySQLDatabase)
ENHANCEMENT Using CliDebugView to report errors on ajax requests (with plaintext output)
ENHANCEMENT Removed "ERROR:" prefix hack for ajax error responses - clientside evaluation should inspect HTTP status codes instead

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@62467 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-09-16 18:12:07 +00:00
Ingo Schommer
57ef082a74 FEATURE Added BulkLoader_Result for better inspection of import results, replacing the simple numeric count result format.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@62396 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-09-15 14:21:43 +00:00
Sam Minnee
6e5b511c46 BUGFIX: Allow creation of a tab and a field of the same name; bug cause by the duplicate field merging code introduced recently.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@62320 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-09-12 04:42:24 +00:00
Sam Minnee
8eca8c3d7f Add another test for addFieldToTab when creating tabs
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@62318 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-09-12 04:21:41 +00:00
Sean Harvey
c9f5e1ef58 ENHANCEMENT Added prepValueForDB() which is called on DBField->writeToManipulation which ensures formatting of value before insertion to DB on a per-DBField type basis.
ENHANCEMENT Added DBFieldTest to test prepValueForDB()

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@62267 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-09-11 06:22:33 +00:00
Sam Minnee
f7806129f5 Made allowed_actions case insensitive
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@62213 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-09-11 00:15:31 +00:00
Sam Minnee
62414fdfa6 FEATURE: #1403 - addFieldToTab(), push(), insertBefore(), etc will allow duplicates - the old field is replaced with the new.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@62211 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-09-11 00:02:49 +00:00
Sam Minnee
6c159b07fb TESTS: Added tests for Controller::join_links()
ENHANCEMENT: You can now use Controller::join_links() to add querystring arguments to a URL

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@61685 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-08-28 04:25:13 +00:00
Sean Harvey
6f8fe1a2fc MINOR phpdoc of @package and @subpackage to reflect the actual package and subpackage
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@61483 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-08-25 08:28:46 +00:00
Sean Harvey
9e7abebd4c MINOR comment changes to allow better readability of comments of what we're testing
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@61482 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-08-25 08:27:16 +00:00
Sean Harvey
5c3379a612 MINOR Additions to FieldSetTest to test removeByName() and removeFieldsFromTab()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@61481 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-08-25 08:15:22 +00:00
Sam Minnee
5fb17f1eca Improved File tests
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@61462 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-08-25 01:42:27 +00:00
Sam Minnee
65604f4ab6 Fixed saving of TableField and added tests
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@61411 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-08-22 03:33:43 +00:00
Sam Minnee
c4b358e26e Work to decouple the ManifestBuilder from the database, so that you can run manifest builder tests without an active database existing
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@61152 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-08-20 04:47:48 +00:00
Saophalkun Ponlu
cad9147916 Fixed bug with CsvBulkLoader
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@61136 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-08-20 04:01:41 +00:00
Sean Harvey
aca28b981b MINOR Added FieldSetTest to the test library
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@60949 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-08-18 05:13:46 +00:00
Sam Minnee
b92b2a5887 Fixed saving of blank values to the has_one relations on versioned objects
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@60830 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-08-15 03:08:03 +00:00
Saophalkun Ponlu
e020ff3f25 Removed error when saving checkboxsetfield with no values.
Added tests for CheckboxSetField

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@60664 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-08-13 23:56:27 +00:00
Sam Minnee
cb86fdb3d1 BUGFIX: Fixed bug with unpaginated TableListFields. Added tests for TableListField pagination
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@60573 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-08-13 01:39:46 +00:00
Sam Minnee
26051153b8 Added tests for random queries
Improved DataObjectTest to use more helpful assertions

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@60572 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-08-13 00:44:52 +00:00
Sam Minnee
a99accbea4 ArrayData should only change the type of included objects if they're not ViewableData.
Included regression test

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@60473 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-08-12 03:34:19 +00:00
Sam Minnee
b5001bc906 Allow object-methods to be used as columns in TableListField
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@60448 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-08-12 00:12:29 +00:00
Sam Minnee
8bf5c3781e Reverted Hierarchy::extraDBFields() because it interfered with normal generation of the site hierarchy. Note that children(), stageChildren(), and liveChildren() cannot be simply labelled as relations because they are methods with a different semantic meaning. I recommend the use of something similar to to enable access to information beyond relations via the data formatters
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@60442 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-08-11 23:51:45 +00:00
Sam Minnee
4258361337 API Change: Turned Requirements::clear_combined_files() into Requirements::delete_combined_files() and Requirements::clear_combined_files()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@60431 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-08-11 23:18:56 +00:00