Commit Graph

1256 Commits

Author SHA1 Message Date
Sam Minnee
4a061fd071 ENHANCEMENT: Refactored MemberTableList field to make better use of DataList and ManyManyList. Refactored ComplexTableField and TableListField to, stripping out as much model logic as possible. 2011-05-01 15:26:28 +12:00
Sam Minnee
3a17d5c427 API CHANGE: Add removeByID(), canSortBy(), and byID() to DataList and its subclasses. 2011-05-01 15:26:01 +12:00
Sam Minnee
c615c4eb91 ENHANCEMENT: First cut of running SearchContext through DataList/DataQuery. Note that the eventual goal is probably to ditch SearchContext entirely. 2011-05-01 15:25:58 +12:00
Sam Minnee
319d2f4952 ENHANCEMENT: Refactored TableListField and subclasses to rely on the DataList to handle data manipulatation.
API CHANGE: A DataList can be passed as the 2nd argument to the constructor; this is the recommended approach for editing non-relations.
API CHANGE: You can't set a custom query; only a custom DataList.
API CHANGE: You can't have one of these fields editing data that doesn't correspond to a DataList - there must be some kind of DataObject behind it.
API CHANGE: If the field's name corresponds to a relation on the object being edited, then the relation is used as the data set - all the source* parameters are ignored.
API CHANGE: relationAutoSetting only works if your form has had the corresponding data object loaded with $form->loadDataFrom().
API CHANGE: relationAutoSetting can't be turned off; attach a non-relation DataList instead.
2011-05-01 15:25:45 +12:00
Sam Minnee
de1494e3a8 ENHANCEMENT: Implemented DataList as the successor of DataObjectSet. DataList doesn't execute the query until it's actually needed, allowing for a more flexible ORM.
API CHANGE: augmentSQL is now passed a DataQuery object from which query parameters can be extracted.
API CHANGE: DataObjectDecorators that manipulate the query can now define augmentDataQueryCreation().
API CHANGE: The container class argument for DataObject::get() is deprecated.
API CHANGE: DataObject::buildSQL() and DataObject::extendedSQL() are deprecated; just use DataObject::get() now.
API CHANGE: DataObject::instance_get() and DataObject::instance_get_one() are deprecated, and can no longer be overloaded.
API CHANGE: DataObject::buildDataObjectSet() is deprecated.
API CHANGE: Cant't call manual manipulation methods on DataList such as insertFirst()
2011-05-01 15:25:45 +12:00
Sam Minnee
5dd03ca9fb MINOR: Added additional tests for the ORM. 2011-05-01 15:25:14 +12:00
Sam Minnee
3619eae9eb MINOR: Don't couple GroupTest to the Member_GroupSet object. 2011-05-01 15:25:14 +12:00
Ingo Schommer
79e0634537 Merge branch 'cms-ui-preparation' 2011-04-28 22:48:02 +12:00
ajshort
3a1c2df4e7 API CHANGE: Renamed DataObjectDecorator to DataExtension.
API CHANGE: Renamed LeftAndMainDecorator to LeftAndMainExtension.
MINOR: Replaced all references to decorators with extension.
2011-04-26 11:01:38 +10:00
Ingo Schommer
583f669c68 API CHANGE Adjusting to split of SiteTree->getCMSFields() into getSettingsFields(), and new tab paths ("Root.Content" instead of "Root.Content.Main") 2011-04-24 11:46:49 +12:00
Ingo Schommer
d5efacbf56 BUGFIX Less fragile 'newness' check on Group->Code in Group->onBeforeWrite() (fixes #6595) 2011-04-14 21:38:07 +12:00
Ingo Schommer
fcca1d454d MINOR Moved TransactionTest->testReadonlyTransaction() to PostgreSQLDatabase driver, which is the only one that actually supports it. We can't have tests failing for all other databases by default for this optional feature which can't be detected through the Database API. 2011-04-06 23:18:31 +12:00
Ingo Schommer
9b29616710 API CHANGE Rearranged files in sapphire to reflect core dependencies more accurately, and have the tests/ folder mirror its folder structure 2011-03-31 09:56:21 +13:00
Ingo Schommer
f4a16d3c77 MINOR Making HTTPTest less fragile around global state. Improved test readability. 2011-03-31 08:37:48 +13:00
Ingo Schommer
2870eb9212 MINOR Changed $fixture_path to relative filenames in all sapphire test cases in order to allow easier file moving and less verbosity in tests 2011-03-30 23:04:48 +13:00
Ingo Schommer
14e1341df6 ENHANCEMENT Added support for SapphireTest::$fixture_file paths relative to current class location ('MyTest.yml' or '../otherfolder/MyTest.yml'). Added SapphireTest->getCurrentAbsolutePath() and getCurrentRelativePath() for easy access within unit tests 2011-03-30 20:05:22 +13:00
Julian Seidenberg
eaa6c6c49d API-CHANGE: removing protected object_to_array method (use get_object_vars instead) 2011-03-30 18:16:17 +13:00
Julian Seidenberg
dec5c0ae60 API CHANGE: TextareaField doesn't have hidden value on read-only transformation. Added hidden fields in a way that doesn't break unit tests too severely (fixes #5056, thanks jshipman) 2011-03-30 18:16:17 +13:00
Julian Seidenberg
0b93a8f7cf API-CHANGE: Allowing non-standard path for session store 2011-03-30 18:16:16 +13:00
Julian Seidenberg
5efdc60029 API-CHANGE: Renaming a folder did not update the folder's filename on the disk. This is now fixed. There is now a one-to-one mapping between a folder and its "Title" label. Files still can have a Title that is different from the Filename (fixes #6088, thanks Pike) 2011-03-30 18:16:16 +13:00
Julian Seidenberg
a204c136fe API CHANGE: JSONDataFormatter builds JSON itself, changing it to use Convert::array2json() instead (fixes #5162, thanks sharvey) 2011-03-30 18:16:12 +13:00
Julian Seidenberg
f94be66cb2 BUGFIX: HTMLText.Summary() will return nothing if there's an image at the beginning. Regex to strip out the image and unit tests (fixes #6436, thanks webbower) 2011-03-30 18:12:31 +13:00
Julian Seidenberg
341245dd4a ENHANCEMENT Allowing custom HTMLCleaner implementations via Diff:: and new TidyHTMLCleaner and PurifierHTMLCleaner classes 2011-03-30 18:02:25 +13:00
Ingo Schommer
0d39a888a1 MINOR Removed references to ContentController from documentatin 2011-03-29 18:20:14 +13:00
Ingo Schommer
95dcc74c10 MINOR Removed reliance of sapphire/admin unit tests on SiteTree and CMSMain 2011-03-29 18:20:10 +13:00
Ingo Schommer
65e7b83421 MINOR Made login form redirection test in SecurityTest explicit, rather than implicit through testLogInAsSomeoneElse() 2011-03-29 18:08:33 +13:00
Ingo Schommer
29afbea69d BUGFIX Fixed ComplexTableFieldTest to work without a valid root url (which breaks the AddForm() redirection) 2011-03-29 18:07:59 +13:00
Ingo Schommer
b78b1309c9 MINOR Removing SiteTree dependency from FulltextSearchableTest 2011-03-29 18:07:58 +13:00
Ingo Schommer
67cc18f5bf MINOR Optional dependency on ThumbnailStripField in HtmlEditorField, preparing the split of this field into a "basic" and "cms" version 2011-03-29 18:07:58 +13:00
Ingo Schommer
41e51abd9a MINOR Made HtmlEditorField dependency to SiteTree optional (to be moved into separate aspect, or down to DBField/model layer) 2011-03-29 18:07:58 +13:00
Ingo Schommer
a9b13509d2 MINOR Removed dependency on SiteTree in various unit tests 2011-03-29 18:07:58 +13:00
Ingo Schommer
ecc28cb565 MINOR Moved MigrateSiteTreeLinkingTask from 'sapphire' to 'cms' module 2011-03-29 18:07:57 +13:00
Ingo Schommer
764c5a842b MINOR Moved Widget, WidgetArea and related files from 'sapphire' to 'cms' module 2011-03-29 18:07:57 +13:00
Ingo Schommer
1c213906cb MINOR Removed unnecessary SiteTree dependency from TransactionTest 2011-03-29 18:07:57 +13:00
Ingo Schommer
d93025d668 MINOR Moved File->BackLinkTracking feature from 'sapphire' to 'cms' 2011-03-29 18:07:57 +13:00
Ingo Schommer
d61444e976 API CHANGE Moved Translatable class into new 'translatable' module 2011-03-29 18:07:56 +13:00
Ingo Schommer
8847beded2 MINOR Moved SearchFormTest and ContentControllerSearchExtensionTest into 'cms' module 2011-03-29 18:07:56 +13:00
Paul Meyrick
251c1df63a MINOR Fixed SSViewerTest->testCurrentTheme() not to rely on SiteConfig 2011-03-29 18:07:55 +13:00
Paul Meyrick
dc36725869 MINOR Using BlankPage template in SecurityTest, BasicAuthTest to remove ContentController dependency
MINOR Checking for SiteTree class existence in Security, Translatable
MINOR Checking for ContentController existence in FulltextSearchable
MINOR Removed unnecessary ContentController tests from ObjectTest
MINOR Replaced CMS specific examples in PermissionCheckboxSetFieldTest, DataObjectTest
MINOR Changed SecurityTest to make assertions against Security/login rather than relying on redirection from admin/cms
2011-03-29 18:07:55 +13:00
Ingo Schommer
7f06f97761 MINOR Moved WidgetArea (and related tests) to "cms" module 2011-03-29 18:07:55 +13:00
Ingo Schommer
204fd2c4ce MINOR Moved SiteTree, SiteTreeDecorator, SiteConfig, ErrorPage, RedirectorPage, VirtualPage (and related tests) to "cms" module 2011-03-29 18:07:55 +13:00
Ingo Schommer
5bf5b744d8 MINOR Moved ContentController, ModelAsController, NestedController, RootURLController (and related tests) to "cms" module 2011-03-29 18:07:55 +13:00
Ingo Schommer
1a598fe39e MINOR Removed obsolete 'usetestmanifest' flag from documentation and RestfulServiceTest 2011-03-28 08:14:03 +13:00
ajshort
bd2a54769c MINOR: Updated WebserverRoutingTest to use Security/ping to test if the server is accesible, since ?usetestmanifest is no longer available. 2011-03-25 14:59:34 +11:00
Hamish Friedlander
2f1ffe2f6f BUGFIX: Manifest test fixtures were interfering with other tests 2011-03-25 14:07:18 +13:00
ajshort
eb1a3fe75a API CHANGE: Separated the actual CURL request generation code from RestfulService::request() into RestfulService::curlRequest().
MINOR: Updated RestfulServiceTest to use a mock service rather than the actual site. This eliminates the need for ?usetestmanifesst.
2011-03-24 21:31:00 +11:00
ajshort
1a0ced4adc MINOR: Updated the i18n tests to use mock template and class manifests. 2011-03-24 21:31:00 +11:00
ajshort
c34105438c FEATURE: Replaced the template manifest with SS_TemplateLoader, which finds templates from a stack of SS_TemplateManifest objects. 2011-03-24 21:30:57 +11:00
ajshort
76f0fc0c92 FEATURE: Added SS_TemplateManifest, which finds all templates within a directory organised by theme and type. 2011-03-24 21:30:20 +11:00
ajshort
07b1308cd4 MINOR: Made it possible to disable caching on a class manifest via a constructor parameter, and used this in ClassManifestTest. 2011-03-24 20:14:43 +11:00