diff --git a/dev/TestRunner.php b/dev/TestRunner.php old mode 100644 new mode 100755 index e9572b274..786499de4 --- a/dev/TestRunner.php +++ b/dev/TestRunner.php @@ -325,6 +325,12 @@ class TestRunner extends Controller { $phpunitwrapper->setSuite($suite); $phpunitwrapper->setCoverageStatus($coverage); + // Make sure TearDown is called (even in the case of a fatal error) + $self = $this; + register_shutdown_function(function() use ($self) { + $self->tearDown(); + }); + $phpunitwrapper->runTests(); // get results of the PhpUnitWrapper class diff --git a/docs/en/howto/simple-contact-form.md b/docs/en/howto/simple-contact-form.md index 1c63dfcaa..f77fb1b5d 100644 --- a/docs/en/howto/simple-contact-form.md +++ b/docs/en/howto/simple-contact-form.md @@ -44,7 +44,7 @@ First we create all the fields we want in the contact form, and put them inside We then create a `[api:FieldList]` of the form actions, or the buttons that submit the form. Here we add a single form action, with the name 'submit', and the label 'Submit'. We'll use the name of the form action later. :::php - return new Form('Form', $this, $fields, $actions); + return new Form($this, 'Form', $fields, $actions); Finally we create the `Form` object and return it. The first argument is the name of the form – this has to be the same as the name of the function that creates the form, so we've used 'Form'. The second argument is the controller that the form is on – this is almost always $this. The third and fourth arguments are the fields and actions we created earlier. diff --git a/docs/en/reference/grid-field.md b/docs/en/reference/grid-field.md index 3b30f6bc8..06326568b 100644 --- a/docs/en/reference/grid-field.md +++ b/docs/en/reference/grid-field.md @@ -1,7 +1,7 @@ # GridField -GridField is SilverStripe's implementation of data grids. Its main purpose is to display tabular data -in a format that is easy to view and modify. It's a can be thought of as a HTML table with some tricks. +Gridfield is SilverStripe's implementation of data grids. Its main purpose is to display tabular data +in a format that is easy to view and modify. It can be thought of as a HTML table with some tricks. It's built in a way that provides developers with an extensible way to display tabular data in a table and minimise the amount of code that needs to be written.