Commit Graph

22 Commits

Author SHA1 Message Date
Damian Mooyman
0b1f297873 Merge remote-tracking branch 'origin/3.1'
Conflicts:
	.travis.yml
	README.md
	admin/code/LeftAndMain.php
	admin/css/screen.css
	admin/scss/screen.scss
	api/RestfulService.php
	conf/ConfigureFromEnv.php
	control/injector/ServiceConfigurationLocator.php
	control/injector/SilverStripeServiceConfigurationLocator.php
	core/ClassInfo.php
	core/Object.php
	css/AssetUploadField.css
	css/ComplexTableField_popup.css
	dev/CSSContentParser.php
	dev/DevelopmentAdmin.php
	docs/en/changelogs/index.md
	docs/en/misc/contributing/code.md
	docs/en/reference/execution-pipeline.md
	filesystem/GD.php
	filesystem/ImagickBackend.php
	filesystem/Upload.php
	forms/Form.php
	forms/FormField.php
	forms/HtmlEditorConfig.php
	forms/gridfield/GridFieldDetailForm.php
	forms/gridfield/GridFieldSortableHeader.php
	lang/en.yml
	model/Aggregate.php
	model/DataList.php
	model/DataObject.php
	model/DataQuery.php
	model/Image.php
	model/MySQLDatabase.php
	model/SQLQuery.php
	model/fieldtypes/HTMLText.php
	model/fieldtypes/Text.php
	scss/AssetUploadField.scss
	search/filters/SearchFilter.php
	security/Authenticator.php
	security/LoginForm.php
	security/Member.php
	security/MemberAuthenticator.php
	security/MemberLoginForm.php
	security/Security.php
	tests/behat/features/bootstrap/SilverStripe/Framework/Test/Behaviour/CmsFormsContext.php
	tests/control/HTTPTest.php
	tests/control/RequestHandlingTest.php
	tests/filesystem/UploadTest.php
	tests/forms/FormTest.php
	tests/forms/NumericFieldTest.php
	tests/model/DataListTest.php
	tests/model/DataObjectTest.php
	tests/model/TextTest.php
	tests/security/MemberAuthenticatorTest.php
	tests/security/SecurityDefaultAdminTest.php
	tests/view/SSViewerCacheBlockTest.php
	tests/view/SSViewerTest.php
2014-11-18 12:45:54 +13:00
Sean Harvey
2b316e79e5 NEW Provide a consistent way of triggering flush
Provides an interface for classes to implement their own flush()
functionality. This function gets called early in a request on
all implementations of Flushable when flush=1|all is requested in the
URL.

This fix came out of an issue where Requirements combined files were not
being cleaned up after dev/build?flush=1, due to the fact that flush
would only occur when you called it while on a page that used those
combined files, but not in any other contexts. This will now call flush
on any implementors of Flushable regardless of the context of where
flush was called.
2014-08-22 09:24:27 +12:00
Damian Mooyman
eb069e605d Remove all redundant whitespace 2014-08-19 09:17:15 +12: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
Simon Welsh
fc5dd2994c Add codesniffer that ensures indentation is with tabs. 2012-12-12 00:12:11 +13:00
Sam Minnee
fe1434678b Revert "Make PHPUnit bootstrap add flush=1"
This reverts commit e0037967c2.

Conflicts:

	tests/travis/_ss_environment.php
2012-08-14 19:00:57 +12:00
Sam Minnee
e0037967c2 Make PHPUnit bootstrap add flush=1 2012-08-14 17:02:12 +12: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
c8c84b0935 Don't flush manifest in test bootstrap for performance reasons
Leave the decision to the phpunit.xml config (via <get> setting),
or to the individual run via "phpunit <folder> '' flush=1".
Flushing takes multiple seconds even on my fast SSD,
which greatly reduces the likelyhood of developers adopting TDD.
2012-07-05 13:33:02 +02:00
Ingo Schommer
85480142c1 CLI bootstrap: Merge existing $_GET and $_REQUEST data
Necessary to have the <get name="db" /> directive
working in phpunit.xml definitions, which in turns allows
us to use GET parameters to switch the database connection
for running automated tests.
2012-07-04 15:20:08 +02:00
Sam Minnee
07c4860031 MINOR: Fixed test 2012-05-28 16:20:28 +12:00
Sean Harvey
68c5066adf MINOR Remove old _ALL_CLASSES from old manifest builder (has been replaced since) 2012-05-10 13:25:04 +12:00
Sean Harvey
a1d676d353 BUGFIX Ensure PHPUnit 3.6 is available, show a nice message if not 2012-05-09 23:40:25 +12:00
Sean Harvey
8b607db0a2 BUGFIX Fixing bootstrap.php to work with FakeController properly for
running tests using phpunit.xml file.
2012-05-09 23:05:38 +12:00
Ingo Schommer
517a0c9e48 MINOR Moving FakeController class (required for bootstrap.php) into its own file, so that autoloading doesn't execute bootstrap (which is the case when invoking TestRunner->module()) 2012-04-30 15:04:59 +02:00
Simon Welsh
3a6341a251 API-CHANGE sapphire folder can now be renamed. 2012-04-15 10:50:19 +12:00
Sam Minnee
b311fbf038 MINOR: Always flush the manifest when using sapphire/test/bootstrap.php 2012-01-10 17:28:11 +13:00
Ingo Schommer
1b544a46a3 MINOR Backported bootstrap.php changes from CI setup (creates a FakeController to avoid empty controller stacks, fake empty session global) 2011-12-04 13:35:06 +01:00
Ingo Schommer
34686ca1dc BUGFIX Restoring system error handlers in bootstrap.php so running tests through the phpunit binary behaves the same way as TestRunner (specifically to fix DeprecationTest on our CI infrastructure) 2011-12-04 13:10:28 +01: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
Sam Minnee
b93fe403c0 MINOR Don't use chdir(), it confuses the hell out of phpunit (e.g. directory_exists() and realpath() no longer work as expected) (from r111051)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112889 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-19 03:43:31 +00:00
Sam Minnee
064ccecd6b ENHANCEMENT Allowing to run single tests via phpunit through new test bootstrap XML file (e.g. "phpunit sapphire/tests/api/RestfulServerTest.php" or "phpunit sapphire/tests/api") (from r111048)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112886 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-19 03:41:34 +00:00