silverstripe-framework/tests/model
Hamish Friedlander 27113f82c3 API Make DataList and ArrayList immutable
In 3.0 there was some confusion about whether DataLists and ArrayLists
were mutable or not. If DataLists were immutable, they'd return the result, and your code
would look like

  $list = $list->filter(....);

If DataLists were mutable, they'd operate on themselves, returning nothing, and your code
would look like

 $list->filter(....);

This makes all DataLists and ArrayList immutable for all _searching_ operations.
Operations on DataList that modify the underlying SQL data store remain mutating.

- These functions no longer mutate the existing object, and if you do not capture the value
returned by them will have no effect:

  ArrayList#reverse
  ArrayList#sort
  ArrayList#filter
  ArrayList#exclude

  DataList#dataQuery (use DataList#alterDataQuery to modify dataQuery in a safe manner)
  DataList#where
  DataList#limit
  DataList#sort
  DataList#addFilter
  DataList#applyFilterContext
  DataList#innerJoin
  DataList#leftJoin
  DataList#find
  DataList#byIDs
  DataList#reverse

- DataList#setDataQueryParam has been added as syntactic sugar around the most common
cause of accessing the dataQuery directly - setting query parameters

- RelationList#setForeignID has been removed. Always use RelationList#forForeignID
when querying, and overload RelationList#foreignIDList when subclassing.

- Relatedly,the protected variable RelationList->foreignID has been removed, as the ID is
now stored on a query parameter. Use RelationList#getForeignID to read it.
2012-12-14 13:30:35 +13:00
..
testimages ENHANCEMENT: use image file name (without file path and extension) for alt attribute when title is not provided 2009-05-24 12:16:17 +00:00
AggregateTest.php Fixed PHPUnit assertions for incomplete tests in core 2012-11-23 15:16:39 +01:00
AggregateTest.yml FEATURE: Add aggregate calculation to DataObject, allowing (cached) calculation of Max, Min, Count, Avg, etc (from r97390) 2010-04-12 05:04:34 +00:00
ArrayListTest.php API Make DataList and ArrayList immutable 2012-12-14 13:30:35 +13:00
ComponentSetTest.php Add codesniffer that ensures indentation is with tabs. 2012-12-12 17:33:31 +13:00
ComponentSetTest.yml MINOR Added ComponentSetTest 2010-02-22 04:37:32 +00:00
CompositeDBFieldTest.php Method visibility according to coding conventions 2012-09-20 10:46:59 +02:00
CurrencyTest.php FIX Remove instances of lines longer than 120c 2012-09-30 17:18:13 +13:00
DatabaseTest.php Fixed PHPUnit assertions for incomplete tests in core 2012-11-23 15:16:39 +01:00
DataDifferencerTest.php FIX Remove instances of lines longer than 120c 2012-09-30 17:18:13 +13:00
DataDifferencerTest.yml API-CHANGE sapphire folder can now be renamed. 2012-04-15 10:50:19 +12:00
DataExtensionTest.php APICHANGE: add_extension() is now called directly on the class, instead of on Object 2012-11-07 11:07:55 +13:00
DataExtensionTest.yml API CHANGE: Renamed DataObjectDecorator to DataExtension. 2011-04-26 11:01:38 +10:00
DataListTest.php API Make DataList and ArrayList immutable 2012-12-14 13:30:35 +13:00
DataObjectDuplicationTest.php FIX Remove instances of lines longer than 120c 2012-09-30 17:18:13 +13:00
DataObjectLazyLoadingTest.php FIX 7934 When lazy loading fields respect version of the record 2012-11-27 17:31:45 +01:00
DataObjectSchemaGenerationTest.php FIX Remove instances of lines longer than 120c 2012-09-30 17:18:13 +13:00
DataObjectTest_Namespaced.php MINOR: Add test using a namespaced class for DataList::filter() and DataList::exclude() 2012-06-25 10:43:37 +12:00
DataObjectTest.php Add codesniffer that ensures indentation is with tabs. 2012-12-12 17:33:31 +13:00
DataObjectTest.yml ENHANCEMENT: Add lazy loading to DataQuery. 2012-04-30 16:12:15 +12:00
DataQueryTest.php Line length fixes 2012-10-03 18:11:31 +02:00
DateTest.php NEW Date->Ago() with "less than a minute" support 2012-12-13 19:01:27 +01:00
DatetimeTest.php NEW Date->Ago() with "less than a minute" support 2012-12-13 19:01:27 +01:00
DbDatetimeTest.php FIX Remove instances of lines longer than 120c 2012-09-30 17:18:13 +13:00
DbDatetimeTest.yml MINOR Removed dependency on SiteTree in various unit tests 2011-03-29 18:07:58 +13:00
DBFieldTest.php Method visibility according to coding conventions 2012-09-20 10:46:59 +02:00
DBLocaleTest.php Method visibility according to coding conventions 2012-09-20 10:46:59 +02:00
DecimalTest.php FIX Remove instances of lines longer than 120c 2012-09-30 17:18:13 +13:00
DecimalTest.yml 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
GDImageTest.php NEW: Enable multiple image manipulation back-ends on the Image class 2012-11-03 19:38:09 -07:00
GroupedListTest.php MINOR Update @package values to match renaming sapphire 2012-04-15 10:50:19 +12:00
HasManyListTest.php MINOR Add newline to end of files without one 2012-04-15 10:50:19 +12:00
HierarchyTest.php Method visibility according to coding conventions 2012-09-20 10:46:59 +02:00
HierarchyTest.yml MINOR Removed dependency on SiteTree in various unit tests 2011-03-29 18:07:58 +13:00
HTMLTextTest.php FIX Remove instances of lines longer than 120c 2012-09-30 17:18:13 +13:00
ImageTest.php NEW: Enable multiple image manipulation back-ends on the Image class 2012-11-03 19:38:09 -07:00
ImageTest.yml MINOR Fixing broken test on Windows 2012-05-04 22:48:47 +12:00
ImagickImageTest.php NEW: Enable multiple image manipulation back-ends on the Image class 2012-11-03 19:38:09 -07:00
LabelFieldTest.php Method visibility according to coding conventions 2012-09-20 10:46:59 +02:00
ManyManyListTest.php BUG Retaining join extraFields on ManyManyList->add() 2012-10-03 14:58:28 +13:00
MapTest.php Method visibility according to coding conventions 2012-09-20 10:46:59 +02:00
MoneyTest.php Add codesniffer that ensures indentation is with tabs. 2012-12-12 17:33:31 +13:00
MoneyTest.yml FEATURE Added Money class for managing monetary amounts with currencies through the Money design pattern. Uses the CompositeDBField interface to contain multiple database columns in a single DBField 2009-05-05 08:10:51 +00:00
MySQLDatabaseTest.php Method visibility according to coding conventions 2012-09-20 10:46:59 +02:00
PaginatedListTest.php Add codesniffer that ensures indentation is with tabs. 2012-12-12 17:33:31 +13:00
PercentageTest.php Method visibility according to coding conventions 2012-09-20 10:46:59 +02:00
SQLQueryTest.php BUG Fixed issue with SQLQuery::lastRow crashing on empty set. Added test cases for lastRow and firstRow. 2012-11-16 13:27:51 +13:00
SQLQueryTest.yml BUG Fixed issue with SQLQuery::lastRow crashing on empty set. Added test cases for lastRow and firstRow. 2012-11-16 13:27:51 +13:00
StringFieldTest.php Method visibility according to coding conventions 2012-09-20 10:46:59 +02:00
TextTest.php FIX Remove instances of lines longer than 120c 2012-09-30 17:18:13 +13:00
TransactionTest.php Method visibility according to coding conventions 2012-09-20 10:46:59 +02:00
UnsavedRelationListTest.php NEW: Allows setting of has_many and many_many relations before writing 2012-11-28 09:37:08 +13:00
UnsavedRelationListTest.yml NEW: Allows setting of has_many and many_many relations before writing 2012-11-28 09:37:08 +13:00
URLSegmentFilterTest.php Method visibility according to coding conventions 2012-09-20 10:46:59 +02:00
VersionedTest.php Add codesniffer that ensures indentation is with tabs. 2012-12-12 17:33:31 +13:00
VersionedTest.yml MINOR Removed dependency on SiteTree in various unit tests 2011-03-29 18:07:58 +13:00