Commit Graph

1117 Commits

Author SHA1 Message Date
Daniel Hensby
ac989cc3c0 Regression due to previous patch
Fixing installer regression due to patch #1972
2013-05-24 15:29:39 +01:00
Sam Minnee
d97ca43cd0 Merge branch '3.1'
Conflicts:
	README.md
	dev/install/install.php5
	forms/ConfirmedPasswordField.php
	tests/forms/FormTest.php
2013-05-23 19:01:58 +12:00
Daniel Hensby
bc9567c9ef FIX Environment file finder logic
Fixing the logic that searches for environment files so that warnings
due to open_basedir are suppressed and both the 'realdir' and the server
path are spidered for the environment file.
2013-05-22 14:35:33 +01:00
Daniel Hensby
9a6a6ec75d Arbitrary placement of _ss_environment.php in parent folders
Removes hardcoding to three levels
2013-05-14 13:39:43 +02:00
Ingo Schommer
7bf790a5fa Merge pull request #1875 from wilr/open6473
FIX: If CSV column mapping maps to function, keep key values
2013-05-14 04:02:01 -07:00
Will Rossiter
7ea96504c6 Code formatting / PHPDoc cleanup 2013-05-14 22:06:02 +12:00
Will Rossiter
c8af0fd7d1 FIX: If CSV column mapping maps to function, keep key value as key.
Fixes http://open.silverstripe.org/ticket/6473

When using CSVParser::$columnMapping to map columns to a callback action, it previously used the action name as the key value. This prevented users from defining multiple entries to the same callback. This patch retains those key values and simply runs the callback field name filter later on.
2013-05-14 22:00:52 +12:00
jean
3de75f396e FIX Avoid unnecessary user_error when no controller set for friendly errors in Debug class 2013-05-14 16:58:57 +12:00
Ingo Schommer
8c9dd02d73 Merge pull request #1876 from wilr/open6449
Suggest users install curl, tidy on their machines.
2013-05-12 14:21:50 -07:00
Zauberfisch
6f11f92f5b Reverted 9a52dae207 & ed19bbc3ba 2013-05-11 18:50:02 +00:00
Will Rossiter
e56abaca4f Suggest users install curl, tidy on their machines. 2013-05-11 18:31:02 +12:00
Jeremy Shipman
d47b202697 Restored c4eac5310e (merge error)
FIX: Instead of CsvBulkLoader->findExistingRecord out right failing (i.e. no duplicate found) when the duplicate check field is empty, it will now continue on to check other duplicateCheck fields.
Added extra testing data to CSVBulkLoaderTest so that it fails.
2013-05-09 23:06:02 +02:00
Ingo Schommer
3b02d22989 Merge remote-tracking branch 'origin/3.0' into 3.1
Conflicts:
	dev/CsvBulkLoader.php
2013-05-09 10:34:20 +02:00
Ingo Schommer
ced199b877 Direct writing of "Security.token" through dev/generatesecuretoken 2013-05-09 10:31:49 +02:00
Ingo Schommer
5d9cbae949 Merge pull request #1819 from oddnoc/csvbulkloader-findexisting-3.1
Use the correct variable as the key into $record
2013-05-08 04:23:05 -07:00
Will Rossiter
22e8ba6ff6 FIX: Check for POST support in installer
Also two minor fixes for Web server configuration
	* Prevent notice on unsupported setups.
	* Show successful message.

Conflicts:
	dev/install/install.php5
2013-05-08 22:51:27 +12:00
Fred Condo
bd5c8520bb FIX: Use the correct variable as the key into $record
It was using $fieldName, which is the CSV field name, not the database
field name. This prevents duplicate detection from working. It now
properly uses $SQL_fieldName.

Update CsvBulkLoaderTest to remove keys that are nonexistent in the CSV
test data. Having them causes the test to fail with an undefined-index
error. This did not previously fail because of the bug in CsvBulkLoader
that this patch fixes. This partially reverts c4eac53.
2013-05-01 06:50:40 -07:00
Fred Condo
68cf2f5db7 Use the correct variable as the key into $record
It was using $fieldName, which is the CSV field name, not the database
field name. This prevents duplicate detection from working. It now
properly uses $SQL_fieldName
2013-04-29 17:25:16 -07:00
Ingo Schommer
6c2e791a48 Merge remote-tracking branch 'origin/3.1' 2013-04-29 08:59:06 +02:00
colymba
41c0f8080e FIX Only block root vendor folder
Use RewriteRule instead to take in account any subfolder via RewriteBase. Deny ss-cache and composer via RewriteRule too.
2013-04-27 16:03:35 +03:00
Jeremy Shipman
c4eac5310e FIX: Instead of CsvBulkLoader->findExistingRecord out right failing (i.e. no duplicate found) when the duplicate check field is empty, it will now continue on to check other duplicateCheck fields.
Added extra testing data to CSVBulkLoaderTest so that it fails.
2013-04-19 16:52:39 +12:00
Ingo Schommer
0343a77d30 Merge remote-tracking branch 'origin/3.1' 2013-04-11 11:42:04 +02:00
Ingo Schommer
9856fcef21 Merge remote-tracking branch 'origin/3.0' into 3.1
Conflicts:
	javascript/DateField.js
	model/DataQuery.php
	model/Versioned.php
	tests/forms/RequirementsTest.php
	tests/model/DataObjectLazyLoadingTest.php
	view/Requirements.php
2013-04-09 14:45:35 +02:00
Ingo Schommer
9a52dae207 Removed LOLCAT locale from installer (fixes #1457) 2013-04-04 11:18:40 +02:00
Sean Harvey
a99c829ed1 Ensure composer files aren't accessible using IIS 2013-04-03 15:59:14 +13:00
Ingo Schommer
b0d3f7f3a2 Merge remote-tracking branch 'origin/3.1'
Conflicts:
	api/RSSFeed.php
	dev/SapphireTest.php
	tests/control/RequestHandlingTest.php
2013-03-26 10:46:41 +01:00
Simon Welsh
a2c64c68e2 Corrects MySQL 'ALTER TABLE' check 2013-03-25 07:53:42 +13:00
Ingo Schommer
3334eafcb1 API Marked statics private, use Config API instead (#8317)
See "Static configuration properties are now immutable, you must use Config API." in the 3.1 change log for details.
2013-03-24 17:20:53 +01:00
Ingo Schommer
f55bd9d3af Allow for short versions in Deprecation::notification_version() 2013-03-24 17:20:36 +01:00
Stephen Shkardoon
3ecc840572 Check for ALTER TABLE in installer (fixes #853) 2013-03-24 20:08:19 +13:00
Simon Welsh
7ce010928d Merge pull request #1327 from ss23/patch-2
BUG Database config values aren't escaped
2013-03-23 12:16:13 -07:00
Stephen Shkardoon
9b9f367e93 BUG Database config values aren't escaped
Causes minor UI issues if you try use database configuration values that happen to have " or other values in them.
2013-03-24 01:05:33 +13:00
Stephen Shkardoon
f27410c257 Missing closing <a> tag in installer 2013-03-24 00:06:54 +13:00
Ingo Schommer
f7400198d7 Merge pull request #1315 from dhensby/patch-4
FIX Adding preview method to CsvBulkLoader
2013-03-20 07:24:52 -07:00
Ingo Schommer
53c84ee1fe Merge remote-tracking branch 'origin/3.0' into 3.1 2013-03-19 14:04:29 +01:00
Ingo Schommer
99ca0471f7 Merge remote-tracking branch 'origin/2.4' into 3.0
Conflicts:
	control/RequestHandler.php
	core/control/ContentController.php
	dev/CsvBulkLoader.php
	docs/en/changelogs/index.md
	docs/en/reference/execution-pipeline.md
	docs/en/topics/commandline.md
	docs/en/topics/controller.md
	docs/en/topics/form-validation.md
	docs/en/topics/forms.md
	docs/en/topics/security.md
	model/MySQLDatabase.php
	security/Security.php
	tests/control/ControllerTest.php
	tests/control/RequestHandlingTest.php
2013-03-19 13:56:04 +01:00
Stephen Shkardoon
143317cc86 BUG SQL Injection in CsvBulkLoader (fixes #6227)
Diff should speak for itself, looks like this will have to be implemented in all supported branches.
2013-03-20 00:45:05 +13:00
Daniel Hensby
0d57f7b19a FIX processAll method respects $preview flag
The preview flag is now respected more thoroughly to stop writing of related objects
2013-03-19 11:23:58 +00:00
Daniel Hensby
3020576f08 FIX Adding preview method to CsvBulkLoader
Currently the CsvBulkLoader doesn't implement the preview method even though it's processor function has the $preview flag.
2013-03-19 11:05:10 +00:00
Andrew Short
bc941c18b6 Merge branch '3.1' 2013-03-15 21:58:37 +11:00
Hamish Friedlander
743a186c32 API Make SSViewer#process return HTMLText not string
This means that you dont have to worry about casting it
as HTMLText again when using the result in a template or other context

However in some situations code might be assuming it can
check with is_string, in which case you now need to use instanceof HTMLText
2013-03-14 12:49:03 +13:00
Hamish Friedlander
6b986cb17d Extract statics via code analysis rather than introspection 2013-02-28 09:43:33 +13:00
Ingo Schommer
ce66bc1eaf Merge remote-tracking branch 'origin/3.1'
Conflicts:
	tests/travis/before_script
2013-02-27 13:34:03 +01:00
Ingo Schommer
bea1b9002d Merge remote-tracking branch 'origin/3.0' into 3.1
Conflicts:
	control/HTTP.php
2013-02-26 13:28:35 +01:00
Ingo Schommer
0c6ac1960e Fixed whitespace usage 2013-02-18 15:43:52 +01:00
Ingo Schommer
92458d9f43 Fixed line lengths 2013-02-18 14:41:49 +01:00
Ingo Schommer
bb724c43b9 Merge pull request #1142 from chillu/pulls/remove-auto-controller-routing
API Removed auto-routing of controller name
2013-02-18 05:30:37 -08:00
Ingo Schommer
957469d770 API Removed auto-routing of controller name
Use custom routing rules to achieve this effect (see changelog)
2013-02-18 14:29:47 +01:00
Hamish Friedlander
7efae6b95f Merge remote-tracking branch 'origin/3.0' into 3.1 2013-02-18 14:31:57 +13:00
Ingo Schommer
ede381326b BUG Secure composer files from web access (fixes #8011)
Already applied to root .htaccess, but required for dynamically
generated file from installer as well. Also added upgrade instructions.
2013-02-17 22:33:04 +01:00
ajshort
889e39cf55 Support running namespaced build tasks. 2013-02-17 18:05:35 +11:00
ajshort
5e6813c02a Use the injector for creating tasks. 2013-02-08 00:32:16 +11:00
Ingo Schommer
634c91c6ff Merge remote-tracking branch 'origin/3.0' into 3.1
Conflicts:
	email/Mailer.php
2013-01-30 12:46:24 +01:00
Sam Minnee
b43bf68f9c MINOR: Minor fixes to FunctionalTest 2013-01-29 18:03:48 +01:00
Sam Minnee
6fcbad1a31 BUGFIX: Updated SilverStripe error handler so that log_errors still works. 2013-01-29 18:03:48 +01:00
Sam Minnee
d8bfc0bb48 API CHANGE: Added Security::set_login_url() so that you can define an alternative log-in page if you have made one yourself. 2013-01-29 18:03:47 +01:00
Sam Minnee
b7a1db7ce3 FIX: Set up the test mailer before loading the fixture, in case fixture-creation causes emails to be generated. 2013-01-29 18:03:45 +01:00
Sam Minnee
5e6f5f9f7e NEW: Allow configuration of send_all_emails_to, ccs_all_emails_to, and bcc_all_emails_to via the config system. 2013-01-29 18:03:27 +01:00
Hamish Friedlander
bec5ae1886 Include code to block yaml files in installer generated .htaccess 2013-01-29 14:20:12 +13:00
Damian Mooyman
f5749795a1 BUG Exception handling and email notification mechanism now correctly considers the stacktrace as provided by the exceptionHandler function, instead of attempting to perform a debug_backtrace further down the reporting chain (which ends up generating an unnecessarily nested stacktrace). Debug was cleaned up so that errorHandler and exceptionHandler both act consistently. As a result, the LogErrorEmailFormatter class could be simplified.
This was required to fix a bug in which exceptions would not have a visible stacktrace when handled by the email logger.
2013-01-24 09:36:42 +01:00
Hamish Friedlander
60c4d999d8 FIX PHPUnit latest not working with composer installed builds
When using composer, we must rely on the composer autoloader to
load in PHPUnit and not try do to so ourselves, as the old
PHPUnit\Autoload.php file doesnt understand how to find things
in vendor
2013-01-23 14:36:41 +13:00
Hamish Friedlander
437914d313 FIX PHPUnit latest not working with composer installed builds
When using composer, we must rely on the composer autoloader to
load in PHPUnit and not try do to so ourselves, as the old
PHPUnit\Autoload.php file doesnt understand how to find things
in vendor
2013-01-23 14:34:42 +13:00
Hamish Friedlander
45eb0f99f7 FIX PHPUnit latest not working with composer installed builds
When using composer, we must rely on the composer autoloader to
load in PHPUnit and not try do to so ourselves, as the old
PHPUnit\Autoload.php file doesnt understand how to find things
in vendor
2013-01-23 14:30:08 +13:00
Daniel Hensby
be78098065 Arbitrary placement of _ss_environment.php in parent folders
Removes hardcoding to three levels
2013-01-21 22:33:54 +01:00
Ingo Schommer
f3c0669fec Merge remote-tracking branch 'origin/3.0' into 3.1
Conflicts:
	_config/uploadfield.yml
	css/UploadField.css
	forms/UploadField.php
	scss/UploadField.scss
	templates/UploadField.ss
	tests/forms/uploadfield/UploadFieldTest.php
2013-01-11 10:02:39 +01:00
Ingo Schommer
e8bfc241fd Setting SapphireTest::is_running_test() in PHPUnit bootstrap
Otherwise conditional logic will only succeed
when run through "sake dev/tests", not when
run through phpunit directly (which is the recommended way now)
2013-01-09 23:31:10 +01:00
Ingo Schommer
79997477b3 Merge remote-tracking branch 'origin/3.0' into 3.1
Conflicts:
	model/DataList.php
2013-01-08 17:16:09 +01:00
Sean Harvey
b63e55a77a Merge pull request #993 from halkyon/htaccess_fix
Fixing .htaccess to ignore rewriting PHP files directly
2013-01-06 17:24:49 -08:00
Ingo Schommer
8ec3641e60 Merge remote-tracking branch 'origin/3.0' into 3.1
Conflicts:
	admin/javascript/LeftAndMain.FieldHelp.js
	lang/en.yml
	model/URLSegmentFilter.php
2012-12-21 15:04:17 +01:00
Ingo Schommer
6bcffd66ad Merge pull request #1063 from drzax/log-file-formatter-fix
BUGFIX Ensure  has length before using string index access.
2012-12-20 10:19:03 -08:00
Ingo Schommer
9ffd25225e Don't complain about pre-replaced YAML fixture relations 2012-12-20 12:46:56 +01:00
Simon Elvery
1a4eaaaf04 BUGFIX Ensure has length before using string index access. 2012-12-20 12:27:09 +10:00
Ingo Schommer
2e1a5081fa API Remove dev/tests/startsession etc, use new "testsession" module
Removed commands: startsession, endsession, sessionloadyml, setdb, emptydb.
See https://github.com/silverstripe-labs/silverstripe-testsession
2012-12-19 16:05:37 +01:00
Ingo Schommer
546d202f3a Don't complain about pre-replaced YAML fixture relations 2012-12-17 15:33:12 +01:00
Ingo Schommer
c5c2df2323 Merge remote-tracking branch 'origin/3.0' into 3.1 2012-12-17 11:54:40 +01:00
Ingo Schommer
e8f3e7b36e Only reset test state in SapphireTest if its previously been set
That's not the case e.g. if the *first* test in a suite
is skipped, so setUp() is never executed completely.
2012-12-17 11:44:08 +01:00
Ingo Schommer
d13c53fda6 Merge remote-tracking branch 'origin/3.0' into 3.1
Conflicts:
	tests/model/DataQueryTest.php
2012-12-14 10:57:28 +01:00
Ingo Schommer
f41f307118 Fixed spacing 2012-12-14 00:09:30 +01:00
Ingo Schommer
c6b1d4aa6b API Storing alternative DB name in cookie rather than session
Session is not initialized by the time we need to use
the setting in DB::connect(). Cookie values get initialized
automatically for each request.

Tightened name format validation to ensure it can only
be used for temporary databases, rather than switching
the browser session to a different production database.

Encrypting token for secure cookie usage.
Added dev/generatesecuretoken to generate this token.
Not storing in YML config directly because of web access issues.
2012-12-13 23:21:48 +01:00
Ingo Schommer
f03ad7b0dd Merge remote-tracking branch 'origin/3.0' into 3.1
Conflicts:
	admin/javascript/LeftAndMain.AddForm.js
	control/Director.php
	control/HTTPResponse.php
	dev/Profiler.php
	email/Mailer.php
	forms/ComplexTableField.php
	forms/ManyManyComplexTableField.php
	forms/SimpleImageField.php
	forms/TableField.php
	forms/TableListField.php
	javascript/ComplexTableField.js
	javascript/ImageFormAction.js
	javascript/TableField.js
	javascript/TableListField.js
	security/Member.php
	tests/behat/features/bootstrap/SilverStripe/Framework/Test/Behaviour/CmsUiContext.php
	tests/forms/TableListFieldTest.php
2012-12-12 10:11:56 +01:00
Sam Minnée
b618909220 Merge pull request #1007 from simonwelsh/indent-sniff
Add codesniffer that ensures indentation is with tabs
2012-12-11 20:46:47 -08:00
Simon Welsh
b0121b541c Add codesniffer that ensures indentation is with tabs. 2012-12-12 17:33:31 +13:00
Ingo Schommer
6571c17992 Merge remote-tracking branch 'origin/3.0' 2012-12-11 17:16:19 +01:00
Ingo Schommer
e8fbfc0bd1 NEW FixtureFactory separated out from YamlFixture
Enables more generic use of the fixture facilities
without dependency on the YAML format, for example
when creating fixtures from Behat step definitions.

Note: The YamlFixture class needs to be created via
Injector::inst()->create('YamlFixture') now,
direct instantiation is no longer supported.
2012-12-11 17:06:27 +01:00
Simon Welsh
fc5dd2994c Add codesniffer that ensures indentation is with tabs. 2012-12-12 00:12:11 +13:00
Ingo Schommer
3be9499c3a Fixed HTML syntax in config-form.html 2012-12-04 17:27:05 +01:00
Ingo Schommer
d1e65b5657 Support for composer-created themes dir structure
Due to git limitations, we can't check out the blackcandy
"parent" theme into themes/blackcandy/ directly, since that
would require sharing paths with git repositories of other themes.
2012-12-04 17:21:53 +01:00
Will Rossiter
683db8dc1d API Explicitly load project template files after modules
Resolves an issue where if not using the themes directory (i.e just a single app folder) you cannot override module templates.
Changes the SS_TemplateManifest constructor with a new $project argument.
2012-12-04 10:47:37 +01:00
Sean Harvey
449cce95a7 Fixing .htaccess to ignore rewriting PHP files directly 2012-12-04 14:36:59 +13:00
Ingo Schommer
15a687f1e7 Merge remote-tracking branch 'origin/3.0' 2012-11-23 15:31:08 +01:00
Ingo Schommer
aa72425e84 Fixed PHPUnit assertions for incomplete tests in core
Avoid PHPUnit throwing "test didn't run any assertions"
notices in PHP. If nothing else, it keeps test output
looking less broken by default, making it more likely
that actual errors do get noticed.
2012-11-23 15:16:39 +01:00
Ingo Schommer
453d04e4ba BUG Reset DataObject caches in SapphireTest->resetDBSchema()
This became a problem with fdcd7a2e where $custom_database_fields
were cached, but never reset. It lead to extensions not applying
correctly in SapphireTest->setUpOnce().
2012-11-23 11:14:02 +01:00
Ingo Schommer
a3cd7ddc09 BUG Force SapphireTest schema reset for extension changes
Previously changes to $requiredExtensions and $illegalExtensions
didn't cause a reset unless there was also other schema-altering
settings like $extensionsToRemove or $extraDataObjects
2012-11-23 11:12:03 +01:00
Sean Harvey
6a868e79e1 Removing deprecated prototype/behaviour libraries 2012-11-16 11:37:56 +13:00
Sean Harvey
26a3c1cf4a Re-adding Debug::caller() which was inadvertently removed in 9eca2d6 2012-11-15 14:56:43 +13:00
Sean Harvey
9eca2d676f Removing deprecated Debug functions, use SS_Log and SS_Backtrace instead 2012-11-15 14:43:14 +13:00
Andrew O'Neil
0c8de0a1de APICHANGE: Use late static binding for Object::has_extension() 2012-11-07 11:07:55 +13:00
Andrew O'Neil
6dd6a5c188 APICHANGE: Use late static binding for Object::remove_extension() 2012-11-07 11:07:55 +13:00
Andrew O'Neil
fdea5321c7 APICHANGE: add_extension() is now called directly on the class, instead of on Object 2012-11-07 11:07:55 +13:00
Simon Welsh
bedb579b07 Merge branch '3.0' 2012-10-23 15:21:20 +13:00
Damian Mooyman
0d7816b55d BUG Fixed issue with Deprecation failing to extract the module from a stacktrace, especially on non-unix systems
API Added Convert::nl2os function to normalise end of line characters across systems with tests
BUG Fixed i18n unit tests in non-unix systems constantly failing
BUG Fixed problems with HTMLCleaner tests failing in non-unix systems
2012-10-17 11:57:16 +13:00
Simon Welsh
4ff8cff262 Minor PHP5.4 fixes
Explictly excludes E_STRICT from live error level and handle arrays in a backtrace
output, rather than trying to convert to string.
2012-10-16 23:37:30 +13:00
Ingo Schommer
392543bde3 BUGFIX Don't' set 'Referer' header in FunctionalTest->get()/post() if its explicitly passed to the method 2012-10-16 10:17:10 +02:00
Sean Harvey
f6a90467e4 Merge branch '3.0' 2012-10-15 10:10:01 +13:00
Sean Harvey
9bb190813f Fixing BulkLoader to use increase_time_limit_to() 2012-10-11 17:12:27 +13:00
Ingo Schommer
d1ee7612f5 Merge remote-tracking branch 'origin/3.0' 2012-10-08 16:48:52 +02:00
Normann Lou
9aaa6b1a7b ENHANCEMENT: change those harded-coded 'sapphire' to 'framework' either in javascript code or inline document, or a <a> href propty. 2012-10-05 17:00:39 +13:00
Simon Welsh
5768e421dc Merge branch '3.0' 2012-10-05 14:40:32 +13:00
Simon Elvery
de36063d15 ENHANCEMENT Make it possible to extend SS_Log
Using late static binding makes it possible to override SS_Log to create
logs which are separate to the main Silverstripe log but still use the
built in functionality.

Add test for SS_Log subclassing.
2012-10-04 16:34:20 +10:00
Ingo Schommer
56f7ce1dcf Merge remote-tracking branch 'origin/3.0'
Conflicts:
	control/Cookie.php
	control/Director.php
	control/HTTPResponse.php
	model/Database.php
	model/MySQLDatabase.php
	model/SQLQuery.php
	view/Requirements.php
	view/SSViewer.php
2012-10-03 16:16:19 +02:00
Sam Minnee
1f7fc1f76a FIX Remove instances of lines longer than 120c
The entire framework repo (with the exception of system-generated files) has been amended to respect the 120c line-length limit.  This is in preparation for the enforcement of this rule with PHP_CodeSniffer.
2012-09-30 17:18:13 +13:00
Sean Harvey
2654290848 Merge pull request #811 from wilr/removestatic
API: Remove static main and dev/buildcache
2012-09-24 19:12:35 -07:00
Simon Welsh
0470219cb1 FIX Output the title of the task instead of Array when listing in the CLI 2012-09-24 13:37:48 +12:00
Will Rossiter
e72114dad7 API: Remove static main and dev/buildcache
Files moved to a separate module (silverstripe-static).
2012-09-21 19:56:56 +12:00
Simon Welsh
1e629f4585 Merge branch '3.0'
Conflicts:
	control/Cookie.php
	control/Director.php
	dev/Profiler.php
	view/Requirements.php
2012-09-21 14:56:56 +12:00
Ingo Schommer
e2f073f38a Method visibility according to coding conventions 2012-09-20 10:46:59 +02:00
Simon Welsh
d0153f32cf Write the test before ending it, so it still exists.
Also, switches to a constant instead of hardcoding the value.
2012-09-19 21:41:34 +12:00
Damian Mooyman
69d888b5d1 FIXED: Issue with test reporting not correctly presenting errors that prevent test execution.
In the case of errors arising during setUp or setUpOnce a unit test will fail to run any individual tests. However, this situation was incorrectly being reported as a test pass (as no tests were run, thus no tests had errors). E.g. the output of a test run that raised an error during setUp would be "0 tests run: 0 passes, 0 failures, and 0 incomplete" with a green background.

To rectify this the following fixes were made:
- Non-cleanly ended tests and test suites are now automatically ended at the end of the test run, as well as at the beginning of subsequent test/suites. This should make catching of errors a lot more robust.
- Errors raised during setup are now no longer lost to the mist of time. The test suite itself will record any error status which was generated outside the scope of any individual tests.
- An additional "errors" count is added to the output at the end of test running. For example, in the case where setup failed and no tests could be run the error would be written to the browser (along with stacktrace) with a message similar to "0 tests run: 0 passes, 0 failures, and 0 incomplete with 1 errors". The intent of this is to separate the concepts of failed/succeeded/incomplete tests from any errors which may have arisen. I.e. no tests "failed" due to the error, but the test run itself is highlighted as an error (red background on the output).

This problem has been a severe cause of issue when testing code that interacts with the database, as any database error during setup would refuse to be shown.
2012-09-19 12:25:58 +12:00
Ingo Schommer
1088d044c5 Merge remote-tracking branch 'origin/3.0'
Conflicts:
	.travis.yml
2012-09-07 17:21:41 +02:00
Andrew O'Neil
3fd4f7e855 BUGFIX: Fix loading of fixtures not specified in $fixtures array 2012-09-05 14:26:43 +12:00
Saophalkun Ponlu
60987acbdb Various minor visual enhancements for Sapphire test report 2012-09-01 11:58:52 +12:00
Sam Minnee
824afffd2e Merge branch '3.0' 2012-08-23 12:39:41 +12:00
Naomi Guyer
69182c21ce BUG: Installer implies empty template used in tutorial
Have reworded the template options so that installers know that the
simple template is used for the tutorial
2012-08-22 13:42:53 +12:00
Ingo Schommer
4cc82e906b Merge remote-tracking branch 'origin/3.0' 2012-08-20 10:13:55 +02:00
Sam Minnée
31d6070bb5 Merge pull request #720 from phptek/XHR-Installer-BUG
BUGFIX: Installer failed complaining about rewrite server-capability: XH...
2012-08-16 18:39:19 -07:00
jakr
c2414aa7dd API Debug::showError() no longer calls exit() (fixes #2644)
Remove exit() from showError to continue execution after an user_error of warning (warningHandler) or notice (noticeHandler) level.
2012-08-16 22:58:55 +02:00
Russell Michell
3ca24a89e9 BUGFIX: Installer failed complaining about rewrite server-capability: XHR response was 3 chars long and therefore !== "OK"
MINOR: Added charset <meta> declaration to prevent errors cluttering up browser-based debugger console output
2012-08-15 13:42:54 +12:00
Ingo Schommer
4eef8e32bd Merge branch '3.0' 2012-08-09 11:51:26 +02:00
Ingo Schommer
68855a209a Guard against double inclusion of phpunit
While a hack, it fixes problems with our build infrastructure,
specifically i18nTextCollectorTask complaining about
double class definition.
2012-08-09 11:51:17 +02:00
Ingo Schommer
fb7008627c Merge remote-tracking branch 'origin/3.0' 2012-08-09 10:47:44 +02:00
Michał Ochman
1432a8e8a1 NEW create TestRunner setdb URL endpoint 2012-08-08 10:46:53 +02:00
Ingo Schommer
342f076f62 Revert "NEW add selectsession URL endpoint"
This reverts commit 766b03f360.
Accidentally pushed from local working copy.
2012-08-08 10:20:36 +02:00
Michał Ochman
766b03f360 NEW add selectsession URL endpoint
This endpoint should be passed a testSessionKey POST parameter.
testSessionKey is an indicator for /tmp/testsessions/<testSessionKey>
file which stores temp database config.

https://github.com/michalochman/SilverStripe-Behaviour-Testing-Framework/issues/27
2012-08-07 09:14:28 +02:00
Ingo Schommer
3ae8b0b665 Merge remote-tracking branch 'origin/3.0' 2012-07-18 15:00:06 +02:00
Simon Elvery
dbc862e784 BUG Attempt to create log path before writing file
Attempt to create the path a log file will be written to before blindly
attempting to write the file. This makes dynamically named log paths
(i.e. rotation by date) possible.
2012-07-17 12:18:35 +10:00
Ingo Schommer
712f28bc78 Scoped deprecation messages (fixes #7645) 2012-07-13 11:37:35 +02:00
Ingo Schommer
64669938da Warning when running tests without flush=1
This is now the default setting for both "sake" and "phpunit"
runs, because of performance reasons (every manifest flush takes
multiple seconds). On the other hand, we want to make errors
like missing classes more obvious to developers.
See discussion in https://github.com/silverstripe/sapphire/pull/620
2012-07-06 12:01:21 +02:00
Ingo Schommer
e00c87541e Merge pull request #618 from chillu/pull/deprecate-profiler
API Deprecated Profiler class, removed related debug GET params
2012-07-05 13:43:37 -07:00
Ingo Schommer
64357a4522 Merge branch '3.0'
Conflicts:
	admin/css/screen.css
	admin/scss/_forms.scss
	docs/en/changelogs/3.0.0.md
2012-07-05 18:01:09 +02:00
Ingo Schommer
0fe515e182 API Deprecated Profiler class, removed related debug GET params
Use third party tools like XHProf instead.
Removed defunct or unnecessary debug GET parameters:
debug_profile, debug_memory, profile_trace, debug_javascript, debug_behaviour
2012-07-05 12:02:06 +02:00
Ingo Schommer
9f0cfe00b6 Merge branch 'gsoc-22-yamlfixture-import-string-rc' of https://github.com/michalochman/sapphire into michalochman-gsoc-22-yamlfixture-import-string-rc 2012-06-29 14:34:17 +02:00
Sam Minnée
c07d4ec95e Merge pull request #590 from willrossi/errorheaders
FIX: exclude error string in headers to prevent white screen display.
2012-06-29 00:51:36 -07:00
Will Rossiter
48408d323a FIX: exclude error string in headers to prevent white screen display. 2012-06-29 18:14:14 +12:00
Will Rossiter
0910a651d5 FIX: restore and update style for DevelopmentAdmin. 2012-06-29 16:52:36 +12:00
Michał Ochman
c282190299 ENHANCEMENT Add YamlFixture String argument support
Enhanced YamlFixtureTest to cover this addition.
2012-06-29 00:33:00 +02:00
Sam Minnee
2598f6596d NEW: Enable display_errors = on in the installer to assist with diagnosis.
Installation problems often come down to a 'white screen of death' either during installation or after it.  The WSOD is generally caused by a PHP error that isn't picked up by SilverStripe's error handler.  This change fixes the first of those.

As a bigger fix, I'd like to see us allow the installation of sites in dev mode, the enabling of display_errors=on in dev mode, and perhaps even the ability to easily perform an initial installation in dev mode before switching to live mode.  However, that's a bigger change for another time.
2012-06-27 09:44:44 +12:00
Ingo Schommer
6af3b076be MINOR Fixed phpdocs 2012-06-20 23:59:57 +02:00
Ingo Schommer
3a7128d00c MINOR Fixed phpdocs 2012-06-20 23:59:16 +02:00
Will Rossiter
eb2a0427cc MINOR: exclude functional tests when running just framework module tests 2012-06-20 16:27:57 +02:00
Will Rossiter
525707f3a7 MINOR: exclude functional tests when running just framework module tests 2012-06-20 16:16:55 +02:00
Sean Harvey
105986392b BUGFIX Supress mkdir() when attempting to create a temp folder, instead
of the variable. This gives a nicer error in the installer.
2012-06-15 11:48:42 +12:00
Sam Minnee
114ebb6953 API CHANGE: Don't have any instance caching in singleton(), rely on Injector for this. 2012-06-11 22:41:12 +12:00
Ingo Schommer
e643559b17 MINOR Warning about HTML5 compat in CSSContentParser 2012-06-05 11:38:27 +02:00
Marcus Nyeholt
82a1e7d282 MINOR Use injector for creating Member_GroupSet object
MINOR Use injector for creating many many list objects

MINOR Use injector for creating objects from within the DataList

MINOR Use Injector::inst() for creating objects; cannot rely on this->injector being present due to many classes being created with 'new', so use inst() directly

MINOR Remove injector autoset property for now; automatically setting it breaks a few test cases that don't know about it for now, and it's not needed just yet
2012-06-05 01:33:44 +10:00
Sam Minnee
f3467a3337 MINOR: Added test listeners to support TeamCity/PHPUnit executions. 2012-05-28 18:31:48 +12:00
Sam Minnee
fb48ec54f4 BUGFIX: Fixed unreliability in SapphireTest::getCurrentAbsolutePath() 2012-05-28 14:25:34 +12:00
Sean Harvey
b325fea709 MINOR Fixing "No current controller available" error when TestSession::__destruct() is called 2012-05-24 16:41:29 +12:00
Sam Minnée
c5616f8724 Merge pull request #487 from nyeholt/injector_bugfixes
Change singleton and strong_create to use dependency injector, with additional fixes to existing classes to behave correctly
2012-05-23 18:46:48 -07:00
Marcus Nyeholt
82495f5a7e BUGFIX Versioned's constructor doesn't provide suitable defaults. Previously a bug/feature in singleton, where it would pass null,true as params to strong_create, which would then get passed through as params to Versioned's constructor, meant that the code still executed fine (as was set to something that wasn't an array, so the null and true were instead taken as args). The fact that the usage of singleton(Versioned) never really used the classes code, purely for value lookup, meant that this never propagated errors. I've now switched singleton() to use the injector for retrieving values, which means these dud values are no longer passed through
CHANGE Given that Config::inst is an implementation of the singleton pattern itself, I've removed the extra call to singleton(). A side effect of this is that it gets around a possibly nasty circular reference with the dependency injector (which relies on the config object); in future, this dependency structure should really be structured from the DI directly.

MINOR Change singleton and strong_create to use dependency injector

BUGFIX: Provide default constructor values for classes (fixes issues when used in 'singleton' scenario during dev/build in particular)

MINOR Clear out injector state when resetting db schema during tests (a follow on from changing singleton() calls to use the injector underneath)
2012-05-23 21:10:04 +10:00
Sean Harvey
77c2365b87 MINOR Replacing deprecated static function calls to Director with
current Controller instance replacements.
2012-05-23 21:50:02 +12:00
Sean Harvey
aaf91154a2 BUGFIX If there is *any* error connecting to MySQL, expose this to the installer. 2012-05-19 11:29:25 +12:00
Sean Harvey
b65dff0fbe BUGFIX Allowing actions related to coverage tests 2012-05-18 16:05:05 +12:00
Ingo Schommer
eeef41e91f SECURITY Fixed remote code execution vuln in install.php due to inserting unescaped user data into mysite/_config.php. Not critical because install.php is required to be removed on a SilverStripe installation anyway (fixes #7205) 2012-05-16 14:59:42 +02:00
Sean Harvey
e095950a50 BUGFIX Installer checks: warn if finfo class not available, re-instating hash check, and remove duplicate iconv check. 2012-05-14 14:18:49 +12:00
Sean Harvey
20a51d6572 MINOR Ensure finfo class exists in installer checks, we need it for MIME
type detection of files.
2012-05-12 10:17:53 +12:00
Sean Harvey
01f8e38eee MINOR Using correct URL for tutorial in installer 2012-05-11 14:51:23 +12:00
Sean Harvey
b1e17578c7 API CHANGE Removed assertType() and assertEmpty() workarounds. Use assertInstanceOf()
instead of assertType(), assertEmpty() is available in PHPUnit 3.5+.
PHPUnit 3.4 is no longer supported, so please upgrade your version to
work.

MINOR Removed FullTestSuite which was a workaround for PHPUnit but not
used.
2012-05-09 23:05:39 +12:00
Ingo Schommer
1671b9c65c BUGFIX Checking for mbstring PHP extension support in installer, as it has been a documented installation requirement for a while. Removing method_exists() checks from mbstring usage in core for the same reasons 2012-05-09 10:25:31 +02:00
Sean Harvey
5bce3425b4 Merge pull request #401 from chillu/is-absolute-url
Director::is_absolute_url() security fixes
2012-05-07 18:47:03 -07:00
Sean Harvey
4e18cc581b BUGFIX Ensure MySQLi is used consistently in MySQLDatabaseConfigurationHelper, not old mysql functions 2012-05-05 11:22:28 +12:00
Ingo Schommer
1f7f8b8aee BUGFIX Don't' set 'Referer' header in FunctionalTest->get()/post() if its explicitly passed to the method 2012-05-04 11:49:30 +02:00
Ingo Schommer
e929753992 MINOR Using correct $locale format in installer (regression from last commit) 2012-05-03 00:00:51 +02:00
Ingo Schommer
0068b6d5b6 BUGFIX Showing only actually available languages for selection during install (fixes #7260) 2012-05-02 23:35:20 +02:00
Andrew O'Neil
fa60f9e8b2 ENHANCEMENT: Implement blowfish encryption and use it by default. (#7111) 2012-05-02 13:51:29 +12:00
Sean Harvey
3ccaa1f864 MINOR Supress any error connecting to the database so the installer
doesn't show it in the page header
2012-04-30 11:15:21 +12:00
Sean Harvey
32d4ec837c Merge pull request #374 from oddnoc/installer-email-password-feedback
BUGFIX: Start a PHP session in installer.
2012-04-27 21:49:38 -07:00
Sean Harvey
b03cf04dbd BUGFIX Updating MySQLDatabaseConfigurationHelper to check for MySQLi
instead of mysql_connect and other old function usage, as we've moved to
MySQLi in MySQLDatabase.php now
2012-04-28 12:13:58 +12:00
Fred Condo
b8228271e6 BUGFIX: Start a PHP session in installer.
This fixes blank username and password on home/successfullyinstalled
2012-04-27 16:51:47 -07:00
Fred Condo
df6a249bf0 BUGFIX: Change requirement rubrics to remove confusion
Resolves #7199

Change all the rubrics to be nouns or questions, rather than a statement of
the desired setting. If the setting is correct, we get a nice green OK; if
not, it was confusing for the rubric to state the opposite of the failure
mode, which is described in the long message.
2012-04-26 15:04:07 -07:00
Sean Harvey
bda849afeb BUGFIX Check for SimpleXML support in PHP at the installation step 2012-04-22 22:43:06 +12:00
Sean Harvey
cc339c37c4 BUGFIX Ensure the SS3 installer checks for CType support in PHP, as language YAML parser uses this in framework. 2012-04-22 17:45:56 +12:00
Sean Harvey
c55e0b8b95 MINOR Fixing up PHP versions to be consistent with
33ae83640b
2012-04-20 15:08:01 +12:00
Sam Minnee
33ae83640b MINOR: Lowered 5.3.10 recommendation to 5.3.4 2012-04-20 14:45:57 +12:00
Sean Harvey
16e950cb6a MINOR Tidy up of code formatting in TestRunner
MINOR Fixing up old ObjectStaticTest and merging into ConfigTest
2012-04-18 23:29:54 +12:00
Sean Harvey
4c6be2931b BUGFIX Removing use of deprecated Object static functions like
get_static(), set_static(), uninherited() etc. Replace with equivalent
Config system get(), update()
2012-04-18 23:10:57 +12:00
Mateusz Uzdowski
e262a29193 ENHANCEMENT: move code introspection functions to the silverstripe-codeviz module 2012-04-17 14:45:26 +12:00
Sean Harvey
69c066cb2c Merge pull request #332 from mateusz/strict
BUGFIX: fix up some E_STRICT errors
2012-04-16 16:59:29 -07:00
Mateusz Uzdowski
59663f9289 BUGFIX: fix up some E_STRICT errors 2012-04-17 11:51:55 +12:00
Will Rossiter
7a4392ca03 Merge pull request #324 from halkyon/installer_fixes
MINOR: Fix install not loading because of Zend/Translate.php dependency in i18n.php
2012-04-16 16:34:53 -07:00
Sean Harvey
5f73643e3f BUGFIX Hardcoding locales in installer, because we can't include i18n
properly, and including core/Core.php is too much.
2012-04-17 11:02:18 +12:00
Sean Harvey
ad2a21cc92 API CHANGE getSysTempDir() is now deprecated, use sys_get_temp_dir()
instead!
2012-04-17 10:53:41 +12:00
Sean Harvey
dc0031cf26 BUGFIX Fixed broken installer trying to include i18n thirdparty Zend
libs, which depends on Core.php being included first because include
paths are setup there first. This has the effect of removing redundant
code in the installer like temp path discovery, as Core takes care of
that for us.
2012-04-17 10:53:40 +12:00
Sean Harvey
d0984ec897 MINOR Line break after sentence of message 2012-04-17 10:53:40 +12:00
Sean Harvey
bbf04ee7ea MINOR Removed function_exists() checks which aren't necessary for PHP 5.2+ 2012-04-16 13:15:41 +12:00
Sean Harvey
ebe75fefab MINOR Update locations to server requirements page 2012-04-15 16:29:14 +12:00
Sean Harvey
515a2ccfcc MINOR Updating old URLs in installer, show message about creating admin
account
2012-04-15 16:01:06 +12:00
Sean Harvey
e71b8d6215 MINOR Installer cleanups, removing references to old "command line
installation" which is no longer supported.
MINOR Removed stray semi-colon when showing version in installer
template.
2012-04-15 15:05:20 +12:00
Sean Harvey
6405c44bc2 MINOR Enable the highest level of error_reporting() in install, to be
consistent with Core.php
2012-04-15 10:50:20 +12:00
Simon Welsh
f07258f3cf MINOR Update @package values to match renaming sapphire 2012-04-15 10:50:19 +12:00
Simon Welsh
3a6341a251 API-CHANGE sapphire folder can now be renamed. 2012-04-15 10:50:19 +12:00
Simon Welsh
f8082e4814 MINOR Add newline to end of files without one 2012-04-15 10:50:19 +12:00
Sean Harvey
f57a763524 MINOR Ensure incomplete tests also have a backtrace 2012-04-15 00:26:17 +12:00
Sean Harvey
ce097a7b54 ENHANCEMENT If there are no test failures, but incomplete tests, mark
summary of test run as "ok but incomplete" in yellow for CliTestReporter
2012-04-15 00:07:15 +12:00
Sean Harvey
edaed5ef7e BUGFIX If SS_Backtrace::get_rendered_backtrace() has $plainText argument
to TRUE, ensure there is no HTML in the output.
2012-04-15 00:05:49 +12:00
Sean Harvey
fc18b2c788 ENHANCEMENT TestReporter now reports incomplete tests properly 2012-04-14 23:11:54 +12:00
Will Rossiter
907568b182 ENHANCEMENT: move hard coded template HTML for composite field and field group out to separate template files. 2012-04-14 17:36:08 +12:00
Robert Curry
8b0dafb30d ENHANCEMENT: Change PHP version requirements. Part of #7131. 2012-04-13 13:12:48 +12:00
Mateusz Uzdowski
5186a0cea3 BUGFIX: remove unnecessary setComponent call - no longer used (os6175) 2012-04-12 17:04:24 +12:00
Ingo Schommer
a3d99b082d MINOR Resetting Security::$database_is_ready state during tests (regression from a9509a610d) 2012-04-11 17:22:55 +02:00
Ingo Schommer
ca24120a5e MINOR Install screen visual tweaks, more visible disabled state on install button, conditional version number (to avoid it showing without a version), referencing new theme in install screen, using new layout in install progress screen as well 2012-04-11 16:49:31 +02:00
Ingo Schommer
ac45e5b9c0 Merge branch 'integration'
Conflicts:
	admin/css/ie8.css
	admin/css/screen.css
	admin/scss/_style.scss
	dev/install/config-form.html
	dev/install/install.css
	dev/install/php5-required.html
2012-04-11 16:31:12 +02:00
Ingo Schommer
6cd91ff449 Merge pull request #299 from ajoneil/sapphire
---

Conflicts:
	forms/NumericField.php
2012-04-11 15:36:35 +02:00
Paul Clarke
4f23ac1722 ENHANCEMENT Installer styling, moving away from blackcandy 2012-04-11 22:51:10 +12:00
Andrew O'Neil
c5aa074bff BUGFIX: Fix E_STRICT errors not being reported 2012-04-11 14:39:02 +12:00
Ingo Schommer
8c5e56fe31 Merge branch 'master' into integration
Conflicts:
	admin/css/screen.css
	dev/install/php5-required.html
2012-04-09 21:10:08 +02:00
Jeremy Bridson
697ffb82a7 ENHANCEMENT:fixed styling on "installing SilverStripe" page. 2012-04-05 12:01:27 +12:00
Jeremy Bridson
c1f6f20114 ENHANCEMENT:added logo to header on ss3 install page - plus compass regenerated icon sprites. 2012-04-05 11:18:11 +12:00
Ingo Schommer
40d73127ae MINOR Using late static binding instead of Object::create() calls 2012-04-04 17:10:31 +02:00
Ingo Schommer
af80ab5ab7 Merge pull request #282 from halkyon/php52_references
Removed checks for versions less than PHP 5.3
2012-04-04 07:47:04 -07:00
Jeremy Bridson
875eef9992 ENHANCEMENT:Styled the php5 required page and fixed a couple of styling issues on the install page in IE. 2012-04-04 13:26:28 +12:00
Jeremy Bridson
63b23a2155 ENHANCEMENT:incorporating "simple" theme into the the SS3 Install - styling the install page to fit with the "simple" theme 2012-04-03 17:31:40 +12:00
Sean Harvey
349019e780 MINOR Adjusted wording based on E_DEPRECATED and E_USER_DEPRECATED error levels. 2012-04-03 10:28:07 +12:00
Sean Harvey
68aaae8cc0 MINOR Update docs and version checking for PHP 5.3+ 2012-04-03 09:54:55 +12:00
Ingo Schommer
2ecfbc49f5 Merge pull request #276 from halkyon/e_deprecated_fixes
E_DEPRECATED fixes - split() replaced with preg_split()
2012-03-28 02:31:04 -07:00
Sean Harvey
e0dc3aaf21 Merge pull request #278 from silverstripe-scienceninjas/install-and-php5-ini-settings
BUGFIX The SilverStripe installer throwing warning on settings that was okey
2012-03-28 02:20:27 -07:00
Stig Lindqvist
1a81c3de27 BUGFIX The SilverStripe installer throwing warning on settings that was legit. 2012-03-28 17:56:57 +13:00
Fred Condo
5954774530 BUGFIX: Use UTC consistently across all tests for date/time calculations
This ensures that tests will not pass or fail based on whether the test
machine is on NZ time.

This partially reverts df050eda5d, which has
already been merged. Instead of finding tests that use date calculations, we
are now setting the default time zone in SapphireTest so it will apply to the
whole test suite and any future tests.

Adjust expected values in certain tests for UTC, where the expected values had
previously been expressed in NZ time.

When creating a temp DB for test fixtures, create the DB connection with
timezone UTC.
2012-03-27 10:29:07 -07:00
Sean Harvey
cf014dc56d MINOR Replaced use of deprecated split() with preg_split() and fixed use of "&new Class()" which is deprecated in PHP 5.3
ENHANCEMENT E_DEPRECATED and E_USER_DEPRECATED are now handled as notice level errors in Debug.
2012-03-27 23:16:52 +13:00
Sam Minnee
7db3b8ecd6 MINOR: Raise deprecation errors in the same way as notice-level errors. 2012-03-24 16:34:10 +13:00
Andrew O'Neil
6db08cbc36 MINOR: Fix tests on PHPUnit 3.4 2012-03-14 16:05:19 +13:00
Sean Harvey
3d62832fbb MINOR Removed session_start() call in installer, as it contradicts the requireFunction check for session_start as part of the installer 2012-03-12 10:25:39 +13:00
Sean Harvey
0c30bfc2dd MINOR Tweak text about display_errors 2012-03-12 10:17:57 +13:00
Robert Curry
d34dca675a MINOR: Fix typographical errors. 2012-03-09 17:00:25 +13:00
Robert Curry
ecb279c33e Issue #6667: Check for TEMP_FOLDER _ss_envrionment override in install script. 2012-03-09 15:06:01 +13:00
Ryan O'Hara
63d5927e50 BUGFIX: Added TemplateGlobalProvider include to installer, as required by i18n. 2012-03-09 10:45:24 +13:00
Ingo Schommer
6c24589a92 Merge pull request #208 from sminnee/fix-startsession
BUGFIX: Fixed dev/tests/startsession form action
2012-03-05 00:07:06 -08:00
Sam Minnee
f1579a2cdd MINOR: Corrected date in installer copyright (open.ss.org #6833) 2012-03-05 14:51:42 +13:00
Sam Minnee
a5e809be49 BUGFIX: Fixed dev/tests/startsession form action 2012-03-05 14:36:38 +13:00
Sam Minnee
adfdd068e2 Merge branch 'ereg-to-preg' of https://github.com/AngryPHPNerd/sapphire
Conflicts:
	model/fieldtypes/Date.php
2012-03-05 13:54:20 +13:00
Kirk Mayo
c211b7c435 Added some simple code to show the location of the loaded php.ini file when php configuration or file permision errors exist 2012-03-04 21:01:12 +13:00
AngryPHPNerd
0e2cbb0b88 Replace ereg with preg_* 2012-02-27 22:14:02 +01:00
Fred Condo
d370423825 Clean up trailing ?> per coding standard
All sapphire but the lang directory
2012-02-12 12:40:16 -08:00
Ingo Schommer
fcf103cd14 MINOR Check for display_errors=Off during installation (fixes #5779) 2012-02-11 01:19:29 +01:00
Ingo Schommer
24e2003e35 ENHANCEMENT Allow logging of extra data in SS_Log::log() (currently only displayed through SS_LogEmailWriter) 2012-02-06 23:38:37 +01:00
Ingo Schommer
d3be6edb4e ENHANCEMENT Allowing string arguments in SS_Log::log() 2012-02-06 23:38:35 +01:00
Ingo Schommer
5284f9019c MINOR Improved email log styling through inline style declaration (which now extends styles to tables), using smaller non-serif font for better readability 2012-02-06 23:38:34 +01:00
Ingo Schommer
c7b02d2063 MINOR Rewrite stack trace from "In line <line> of <file>" to a more readable and common "<file>:<line>" 2012-02-06 23:38:32 +01:00
Andrew O'Neil
15a641a99c BUGFIX Clear requirements after running a unit test 2012-02-03 13:07:12 +01:00
Sam Minnee
af22d0743a MINOR: On PHPUnit 3.6, show the output of tests. 2012-02-01 11:01:49 +13:00
Sam Minnee
5956ad82fc MINOR: Amended PHPUnit execution to work with PHPUnit 3.6 2012-02-01 11:00:58 +13:00
dompie
3c09e9dfc4 ENH: Some webhosters require username/password credentials to test for
existing DB server
2012-01-11 16:05:19 +01:00
James Miller
f1542edd1e Unicode actually fixed... 2012-01-10 16:15:03 +13:00
James Miller
3f59f13c6b Fixed odd unicode character issue 2012-01-10 16:11:25 +13:00
Aatch
80e2985f49 Wrap the Last Edited Date in single quotes, doesn't work otherwise. 2012-01-10 16:01:24 +13:00
James Miller
bf2ba121bd Allowed the fixture to overwrite the LastEdited field on an object 2012-01-10 13:24:31 +13:00
joaosantos81
889bcf74c0 Currently, the time format does not allow differentiate the AM/PM hours since the format choosen is 12h and no AM/PM label is added to each log line. So, my suggestion is to convert to 24h format (using a H instead of h) to fix this issue.
More details, see PHP date function doc - http://php.net/manual/en/function.date.php
2011-12-29 16:17:14 +00:00
Sam Minnee
0bdfc0c515 MINOR: On PHPUnit 3.6, show the output of tests. 2011-12-17 16:42:31 +13:00
Mark James
e102d9ddc9 BUGFIX: Corrected use of ENT_QUOTES/UTF8 on htmlentities in installer introduced by r3a7ac9759ab8f98eee0bb15db4618fd0ee146ab6. fixes #6806 2011-12-16 22:27:42 +00:00
Ingo Schommer
3a7ac9759a BUGFIX Consistently using multibyte-safe htmlentities() 2011-11-29 10:43:06 +01:00
Sam Minnee
f1480c20bf MINOR: Amended PHPUnit execution to work with PHPUnit 3.6 2011-11-08 11:26:40 +13:00
Hamish Friedlander
bc7217d1ea BUGFIX: Deprecation notices should fire in test mode too, just not in live mode 2011-10-31 13:51:31 +13:00
Stig Lindqvist
6cf03b9c2b MINOR Fixed whitespace and added docblocks 2011-10-28 02:11:55 +02:00
Stig Lindqvist
3c5fd14f38 BUGFIX Deprecation class throws notice on PHP 5.2
Checks on constants must be within quotes.
2011-10-28 02:09:28 +02:00
Sam Minnee
e5afa25522 MINOR: Use Deprecation class to indicate deprecated methods in core. 2011-10-29 17:34:31 +13:00
Sam Minnee
ad9bc59d10 ENHANCEMENT: Include the caller of the deprecated method in the notice that it throws. 2011-10-29 17:34:31 +13:00
Sam Minnee
4c93c3be19 ENHANCEMENT: Allow Deprecation::notice() to be called without passing release number. 2011-10-29 17:34:31 +13:00
Hamish Friedlander
436e0f0475 ENHANCEMENT: Make the installer work when CMS module isnt present 2011-10-29 17:23:22 +13:00
Hamish Friedlander
af667eb8ec ENHANCEMENT: Move install.php to sapphire and seperate the PHP version check from the rest of it so we dont have to worry about PHP4 so much. TODO: Allow it to be run directly without needing the stub install.php in the root from silverstripe-installer 2011-10-29 16:40:27 +13:00
Will Rossiter
b70bc85ed3 MINOR remove missing icon from debug view 2011-10-29 15:47:07 +13:00
Simon Welsh
840343ffb7 Checks for array to string conversion (E_NOTICE as of PHP5.4) 2011-10-29 10:49:17 +13:00
Stig Lindqvist
e38dd08ea5 MINOR: Fix docblocks to reference SS_List instead of (now deprecated) DataObjectSet where appropriate 2011-10-28 15:58:55 +13:00
Hamish Friedlander
0a3e0f15de MINOR: Replace references to FieldSet (now deprecated) with references to FieldList 2011-10-28 15:58:55 +13:00
Hamish Friedlander
e5ea2ea94d ENHANCEMENT: Add Deprecation class to handle throwing deprecation notices nicely on methods that are still in use in framework or cms 2011-10-28 15:58:54 +13:00
Stig Lindqvist
2101d3c09b MINOR Added codecoverage on a single test to the allowed actions 2011-09-27 11:00:28 +13:00
Will Rossiter
37d197c52f MINOR altered skipTest to be a instance property rather than static 2011-09-26 17:11:49 +13:00
Will Rossiter
1732a17114 Merged new-orm into datagrid 2011-09-26 16:47:54 +13:00
Will Rossiter
e740bf8a65 ENHANCEMENT: added SapphireTest:: boolean to flag tests that should be skipped from the TestRunner 2011-09-26 16:08:41 +13:00
Ingo Schommer
ce8e72cf0e MINOR Removing executable flag from all files (thanks miiihi) 2011-09-18 22:04:02 +02:00
Ingo Schommer
d4e42c2b11 MINOR Declaring SS_SysLogWriter::factory() to comply with changed parent interface 2011-08-12 17:05:54 +02:00
Ingo Schommer
8249834cf6 MINOR Adding 'runTask' to allowed_actions in TaskRunner 2011-08-12 17:05:54 +02:00
Ingo Schommer
f11751c42d MINOR Fixed SS_LogEmailWriter and SS_LogFileWriter to adhere to new Zend interface 2011-05-30 21:30:32 +12:00
Ingo Schommer
9d344a07d3 ENHANCEMENT Allowing filtered arguments on specific functions like mysql_connect() in SS_Backtrace 2011-05-30 18:06:41 +12:00
Ingo Schommer
0adac9d40b ENHANCEMENT Allowing filtered arguments on specific functions like mysql_connect() in SS_Backtrace 2011-05-26 22:04:01 +12:00
ajshort
3f132a105b API CHANGE: Replaced DataObjectSet instances with ArrayList. 2011-05-05 20:40:24 +10:00
Sam Minnee
7fbb919ce8 API CHANGE: Introduce DataModel object, as a representation of the project's entire data model, and tie it to $this->model an all DataObjects, Controllers, and RequestHandlers for easy non-static access.
API CHANGE: Add DataList::newObject(), which creates a new object on that DataList.
API CHANGE: RequestHandler::handleRequest() now needs to handle a $model argument, if you override it.
2011-05-01 17:33:02 +12:00
ajshort
ff3d3816ca MINOR: Updated SapphireTest::dataObjectArrayMatch() to use array_key_exists() rather than isset(). This allows tempting for NULL values in DOS assertion methods. 2011-05-01 15:26:29 +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
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
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
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
Ingo Schommer
b1f27b40ce MINOR Updated image references in sapphire/ folder to local files, rather than requiring cms/ folder (copied a bunch of images files over for this) 2011-03-29 21:34:26 +13:00
Ingo Schommer
5f59b3a3c9 MINOR Fixed paths due to file moving into sapphire/admin 2011-03-29 18:08:32 +13:00
Ingo Schommer
1225426e75 MINOR Fixed @package declarations 2011-03-29 18:07:58 +13:00
Ingo Schommer
6d18e38278 MINOR Checking for optional classes in 'cms' module in SapphireTest 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
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
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
bc0a1b7a05 MINOR: Updated various methods to use new manifest methods rather than ManifestBuilder functions or globals. 2011-03-24 20:14:43 +11:00
ajshort
0c78935db4 API CHANGE: Replaced ManifestBuilder::load_test_manifest() calls with new function TestRunner::use_test_manifest(), which pushes a test manifest onto the class loader. 2011-03-24 20:14:43 +11:00