diff --git a/docs/en/02_Developer_Guides/00_Model/01_Page_Types.md b/docs/en/02_Developer_Guides/00_Model/01_Page_Types.md
index 2997e0a0c..ed391f5f1 100644
--- a/docs/en/02_Developer_Guides/00_Model/01_Page_Types.md
+++ b/docs/en/02_Developer_Guides/00_Model/01_Page_Types.md
@@ -1,5 +1,7 @@
# Page Types
+Hi people
+
## Introduction
Page Types are the basic building blocks of any SilverStripe website. A page type can define:
diff --git a/docs/en/02_Developer_Guides/05_Extending/index.md b/docs/en/02_Developer_Guides/05_Extending/index.md
index 0d30602c5..74bfc712c 100644
--- a/docs/en/02_Developer_Guides/05_Extending/index.md
+++ b/docs/en/02_Developer_Guides/05_Extending/index.md
@@ -5,4 +5,4 @@ summary: Understand the ways to modify the built-in functionality through Extens
## How-to
-[CHILDREN How_To]
\ No newline at end of file
+[CHILDREN Folder=How_To]
\ No newline at end of file
diff --git a/docs/en/02_Developer_Guides/06_Testing/00_Unit_Testing.md b/docs/en/02_Developer_Guides/06_Testing/00_Unit_Testing.md
new file mode 100644
index 000000000..1771e640b
--- /dev/null
+++ b/docs/en/02_Developer_Guides/06_Testing/00_Unit_Testing.md
@@ -0,0 +1,269 @@
+title: Unit and Integration Testing
+summary: Test models, database logic and your object methods.
+
+# Unit and Integration Testing
+
+A Unit Test is an automated piece of code that invokes a unit of work in the application and then checks the behavior
+to ensure that it works as it should. A simple example would be to test the result of a PHP method.
+
+**mysite/code/Page.php**
+
+ :::php
+ assertEquals(2, Page::MyMethod());
+ }
+ }
+
+
+Tests for your application should be stored in the `mysite/tests` directory. Test cases for add-ons should be stored in
+the `(modulename)/tests` directory.
+
+Test case classes should end with `Test` (e.g PageTest) and test methods must start with `test` (e.g testMyMethod).
+
+
+A SilverStripe unit test is created by extending one of two classes, [api:SapphireTest] or [api:FunctionalTest].
+
+[api:SapphireTest] is used to test your model logic (such as a `DataObject`), and [api:FunctionalTest] is used when
+you want to test a `Controller`, `Form` or anything that requires a web page.
+
+
+`FunctionalTest` is a subclass of `SapphireTest` so will inherit all of the behaviors. By subclassing `FunctionalTest`
+you gain the ability to load and test web pages on the site.
+
+`SapphireTest` in turn, extends `PHPUnit_Framework_TestCase`. For more information on `PHPUnit_Framework_TestCase` see
+the [PHPUnit](http://www.phpunit.de) documentation. It provides a lot of fundamental concepts that we build on in this
+documentation.
+
+
+## Running Tests
+
+### PHPUnit Binary
+
+The `phpunit` binary should be used from the root directory of your website.
+
+ :::bash
+ phpunit
+ # Runs all tests
+
+ phpunit framework/tests/
+ # Run all tests of a specific module
+
+ phpunit framework/tests/filesystem
+ # Run specific tests within a specific module
+
+ phpunit framework/tests/filesystem/FolderTest.php
+ # Run a specific test
+
+ phpunit framework/tests '' flush=all
+ # Run tests with optional `$_GET` parameters (you need an empty second argument)
+
+
+If phpunit is not installed globally on your machine, you may need to replace the above usage of `phpunit` with the full
+path (e.g `vendor/bin/phpunit framework/tests`)
+
+
+
+All command-line arguments are documented on [phpunit.de](http://www.phpunit.de/manual/current/en/textui.html).
+
+
+### Via a Web Browser
+
+Executing tests from the command line is recommended, since it most closely reflects test runs in any automated testing
+environments. If for some reason you don't have access to the command line, you can also run tests through the browser.
+
+ http://yoursite.com/dev/tests
+
+
+### Via the CLI
+
+The [sake](../cli) executable that comes with SilverStripe can trigger a customized `[api:TestRunner]` class that
+handles the PHPUnit configuration and output formatting. While the custom test runner a handy tool, it's also more
+limited than using `phpunit` directly, particularly around formatting test output.
+
+ :::bash
+ sake dev/tests/all
+ # Run all tests
+
+ sake dev/tests/module/framework,cms
+ # Run all tests of a specific module (comma-separated)
+
+ sake dev/tests/FolderTest,OtherTest
+ # Run specific tests (comma-separated)
+
+ sake dev/tests/all "flush=all&foo=bar"
+ # Run tests with optional `$_GET` parameters
+
+ sake dev/tests/all SkipTests=MySkippedTest
+ # Skip some tests
+
+
+## Test Databases and Fixtures
+
+SilverStripe tests create their own database when the test starts. New `ss_tmp` databases are created using the same
+connection details you provide for the main website. The new `ss_tmp` database does not copy what is currently in your
+application database. To provide seed data use a [Fixture](fixtures) file.
+
+
+As the test runner will create new databases for the tests to run, the database user should have the appropriate
+permissions to create new databases on your server.
+
+
+
+The test database is rebuilt every time one of the test methods is run. Over time, you may have several hundred test
+databases on your machine. To get rid of them is a call to `http://yoursite.com/dev/tests/cleanupdb`
+
+
+## Custom PHPUnit Configuration
+
+The `phpunit` executable can be configured by command line arguments or through an XML file. SilverStripe comes with a
+default `phpunit.xml.dist` that you can use as a starting point. Copy the file into `phpunit.xml` and customize to your
+needs.
+
+**phpunit.xml**
+
+ :::xml
+
+
+ mysite/tests
+ cms/tests
+ framework/tests
+
+
+
+
+
+
+
+
+ sanitychecks
+
+
+
+
+
+This configuration file doesn't apply for running tests through the "sake" wrapper
+
+
+
+### setUp() and tearDown()
+
+In addition to loading data through a [Fixture File](fixtures), a test case may require some additional setup work to be
+run before each test method. For this, use the PHPUnit `setUp` and `tearDown` methods. These are run at the start and
+end of each test.
+
+ :::php
+ "Page $i"));
+ $page->write();
+ $page->publish('Stage', 'Live');
+ }
+
+ // reset configuration for the test.
+ Config::nest();
+ Config::inst()->update('Foo', 'bar', 'Hello!');
+ }
+
+ public function tearDown() {
+ // restores the config variables
+ Config::unnest();
+
+ parent::tearDown();
+ }
+
+ public function testMyMethod() {
+ // ..
+ }
+
+ public function testMySecondMethod() {
+ // ..
+ }
+ }
+
+`tearDownOnce` and `setUpOnce` can be used to run code just once for the file rather than before and after each
+individual test case.
+
+ :::php
+
+These commands will output a report to the `assets/coverage-report/` folder. To view the report, open the `index.html`
+file within a web browser.
+
+
+Typically, only your own custom PHP code in your project should be regarded when producing these reports. To exclude
+some `thirdparty/` directories add the following to the `phpunit.xml` configuration file.
+
+ :::xml
+
+
+ framework/dev/
+ framework/thirdparty/
+ cms/thirdparty/
+
+
+ mysite/thirdparty/
+
+
+
+## Related Documentation
+
+* [How to Write a SapphireTest](how_tos/write_a_sapphiretest)
+* [How to Write a FunctionalTest](how_tos/write_a_functionaltest)
+* [Fixtures](fixtures)
+
+## API Documentation
+
+* [api:TestRunner]
+* [api:SapphireTest]
+* [api:FunctionalTest]
\ No newline at end of file
diff --git a/docs/en/02_Developer_Guides/06_Testing/00_Why_Should_I_Test.md b/docs/en/02_Developer_Guides/06_Testing/00_Why_Should_I_Test.md
deleted file mode 100644
index 3cb5a63fc..000000000
--- a/docs/en/02_Developer_Guides/06_Testing/00_Why_Should_I_Test.md
+++ /dev/null
@@ -1,93 +0,0 @@
-# Why Unit Test?
-
-*Note: This is part of the [SilverStripe Testing Guide](/topics/testing/).*
-
-So at this point, you might be thinking, *"that's way too complicated, I don't have time to write unit tests on top of
-all the things I'm already doing"*. Fair enough. But, maybe you're already doing things that are close to unit testing
-without realizing it. Everyone tests all the time, in various ways. Even if you're just refreshing a URL in a browser to
-review the context of your changes, you're testing!
-
-First, ask yourself how much time you're already spending debugging your code. Are you inserting `echo`, `print_r`,
-and `die` statements into different parts of your program and watching the details dumping out to screen? **Yes, you
-know you are.** So how much time do you spend doing this? How much of your development cycle is dependent on dumping out
-the contents of variables to confirm your assumptions about what they contain?
-
-From this position, it may seem that unit testing may take longer and have uncertain outcomes simply because it involves
-adding more code. You'd be right, in the sense that we should be striving to write as little code as possible on
-projects. The more code there is, the more room there is for bugs, the harder it is to maintain. There's absolutely no
-doubt about that. But if you're dumping the contents of variables out to the screen, you are already making assertions
-about your code. All unit testing does is separate these assertions into separate runnable blocks of code, rather than
-have them scattered inline with your actual program logic.
-
-The practical and immediate advantages of unit testing are twofold. Firstly, they mean you don't have to mix your
-debugging and analysis code in with your actual program code (with the need to delete, or comment it out once you're
-done). Secondly, they give you a way to capture the questions you ask about your code while you're writing it, and the
-ability to run those questions over and over again, with no overhead or interference from other parts of the system.
-
-Unit testing becomes particularly useful when exploring boundary conditions or edge case behavior of your code. You can
-write assertions that verify examples of how your methods will be called, and verify that they always return the right
-results each time. If you make changes that have the potential to break these expected results, running the unit tests
-over and over again will give you immediate feedback of any regressions.
-
-Unit tests also function as specifications. They are a sure way to describe an API and how it works by simply running
-the code and demonstrating what parameters each method call expects and each method call returns. You could think of it
-as live API documentation that provides real-time information about how the code works.
-
-Unit test assertions are best understood as **pass/fail** statements about the behavior of your code. Ideally, you want
-every assertion to pass, and this is usually up by the visual metaphor of green/red signals. When things are all green,
-it's all good. Red indicates failure, and provides a direct warning that you need to fix or change your code.
-
-## Getting Started
-
-Everyone has a different set of ideas about what makes good code, and particular preferences towards a certain style of
-logic. At the same time, frameworks and programming languages provide clear conventions and design idioms that guide
-code towards a certain common style.
-
-If all this ranting and raving about the importance of testing hasn't made got you thinking that you want to write tests
-then we haven't done our job well enough! But the key question still remains - *"where do I start?"*.
-
-To turn the key in the lock and answer this question, we need to look at how automated testing fits into the different
-aspects of the SilverStripe platform. There are some significant differences in goals and focus between different layers
-of the system and interactions between the core, and various supporting modules.
-
-### SilverStripe Core
-
-In open source core development, we are focussing on a large and (for the most part) stable system with existing well
-defined behavior. Our overarching goal is that we do not want to break or change this existing behavior, but at the same
-time we want to extend and improve it.
-
-Testing the SilverStripe framework should focus on [characterization](http://en.wikipedia.org/wiki/Characterization_Test).
-We should be writing tests that illustrate the way that the API works, feeding commonly used methods with a range of
-inputs and states and verifying that these methods respond with clear and predictable results.
-
-Especially important is documenting and straighten out edge case behavior, by pushing various objects into corners and
-twisting them into situations that we know are likely to manifest with the framework in the large.
-
-### SilverStripe Modules
-
-Modules usually encapsulate a smaller, and well defined subset of behavior or special features added on top of the core
-platform. A well constructed module will contain a reference suite of unit tests that documents and verifies all the
-basic aspects of the module design. See also: [modules](/topics/modules).
-
-### Project Modules
-
-Testing focus on client projects will not be quite so straightforward. Every project involves different personalities,
-goals, and priorities, and most of the time, there is simply not enough time or resources to exhaustively predicate
-every granular aspect of an application.
-
-On application projects, the best option is to keep tests lean and agile. Most useful is a focus on experimentation and
-prototyping, using the testing framework to explore solution spaces and bounce new code up into a state where we can be
-happy that it works the way we want it to.
-
-## Rules of Thumb
-
-**Be aware of breaking existing behavior.** Run your full suite of tests every time you do a commit.
-
-**Not everything is permanent.** If a test is no longer relevant, delete it from the repository.
-
-## See Also
-
-* [Getting to Grips with SilverStripe
-Testing](http://www.slideshare.net/maetl/getting-to-grips-with-silverstripe-testing)
-
-
diff --git a/docs/en/02_Developer_Guides/06_Testing/01_Functional_Testing.md b/docs/en/02_Developer_Guides/06_Testing/01_Functional_Testing.md
new file mode 100644
index 000000000..b2320ab17
--- /dev/null
+++ b/docs/en/02_Developer_Guides/06_Testing/01_Functional_Testing.md
@@ -0,0 +1,106 @@
+title: Functional Testing
+summary: Test controllers, forms and HTTP responses.
+
+# Functional Testing
+
+[api:FunctionalTest] test your applications `Controller` logic and anything else which requires a web request. The
+core idea of these tests is the same as `SapphireTest` unit tests but `FunctionalTest` adds several methods for
+creating [api:SS_HTTPRequest], receiving [api:SS_HTTPResponse] objects and modifying the current user session.
+
+## Get
+
+ :::php
+ $page = $this->get($url);
+
+Performs a GET request on $url and retrieves the [api:SS_HTTPResponse]. This also changes the current page to the value
+of the response.
+
+## Post
+
+ :::php
+ $page = $this->post($url);
+
+Performs a POST request on $url and retrieves the [api:SS_HTTPResponse]. This also changes the current page to the value
+of the response.
+
+## Submit
+
+ :::php
+ $submit = $this->submitForm($formID, $button = null, $data = array());
+
+Submits the given form (`#ContactForm`) on the current page and returns the [api:SS_HTTPResponse].
+
+## LogInAs
+
+ :::php
+ $this->logInAs($member);
+
+Logs a given user in, sets the current session. To log all users out pass `null` to the method.
+
+ :::php
+ $this->logInAs(null);
+
+## Assertions
+
+The `FunctionalTest` class also provides additional asserts to validate your tests.
+
+### assertPartialMatchBySelector
+
+ :::php
+ $this->assertPartialMatchBySelector('p.good',array(
+ 'Test save was successful'
+ ));
+
+Asserts that the most recently queried page contains a number of content tags specified by a CSS selector. The given CSS
+selector will be applied to the HTML of the most recent page. The content of every matching tag will be examined. The
+assertion fails if one of the expectedMatches fails to appear.
+
+
+### assertExactMatchBySelector
+
+ :::php
+ $this->assertExactMatchBySelector("#MyForm_ID p.error", array(
+ "That email address is invalid."
+ ));
+
+Asserts that the most recently queried page contains a number of content tags specified by a CSS selector. The given CSS
+selector will be applied to the HTML of the most recent page. The full HTML of every matching tag will be examined. The
+assertion fails if one of the expectedMatches fails to appear.
+
+### assertPartialHTMLMatchBySelector
+
+ :::php
+ $this->assertPartialHTMLMatchBySelector("#MyForm_ID p.error", array(
+ "That email address is invalid."
+ ));
+
+Assert that the most recently queried page contains a number of content tags specified by a CSS selector. The given CSS
+selector will be applied to the HTML of the most recent page. The content of every matching tag will be examined. The
+assertion fails if one of the expectedMatches fails to appear.
+
+
+` ` characters are stripped from the content; make sure that your assertions take this into account.
+
+
+### assertExactHTMLMatchBySelector
+
+ :::php
+ $this->assertExactHTMLMatchBySelector("#MyForm_ID p.error", array(
+ "That email address is invalid."
+ ));
+
+Assert that the most recently queried page contains a number of content tags specified by a CSS selector. The given CSS
+selector will be applied to the HTML of the most recent page. The full HTML of every matching tag will be examined. The
+assertion fails if one of the expectedMatches fails to appear.
+
+
+` ` characters are stripped from the content; make sure that your assertions take this into account.
+
+
+## Related Documentation
+
+* [How to write a FunctionalTest](how_tos/write_a_functionaltest)
+
+## API Documentation
+
+* [api:FunctionalTest]
diff --git a/docs/en/02_Developer_Guides/06_Testing/01_PHPUnit_Configuration.md b/docs/en/02_Developer_Guides/06_Testing/01_PHPUnit_Configuration.md
deleted file mode 100644
index 92db5bfbe..000000000
--- a/docs/en/02_Developer_Guides/06_Testing/01_PHPUnit_Configuration.md
+++ /dev/null
@@ -1,110 +0,0 @@
-# Configure PHPUnit for your project
-
-This guide helps you to run [PHPUnit](http://phpunit.de) tests in your SilverStripe project.
-See "[Testing](/topics/testing)" for an overview on how to create unit tests.
-
-## Coverage reports
-
-PHPUnit can generate code coverage reports for you ([docs](http://www.phpunit.de/manual/current/en/code-coverage-analysis.html)):
-
- * `phpunit --coverage-html assets/coverage-report`: Generate coverage report for the whole project
- * `phpunit --coverage-html assets/coverage-report mysite/tests/`: Generate coverage report for the "mysite" module
-
-Typically, only your own custom PHP code in your project should be regarded when
-producing these reports. Here's how you would exclude some `thirdparty/` directories:
-
-
-
- framework/dev/
- framework/thirdparty/
- cms/thirdparty/
-
-
- mysite/thirdparty/
-
-
-
-## Running unit and functional tests separately
-
-You can use the filesystem structure of your unit tests to split
-different aspects. In the simplest form, you can limit your test exeuction
-to a specific directory by passing in a directory argument (`phpunit mymodule/tests`).
-To specify multiple directories, you have to use the XML configuration file.
-This can be useful to only run certain parts of your project
-on continous integration, or produce coverage reports separately
-for unit and functional tests.
-
-Example `phpunit-unittests-only.xml`:
-
-
-
-
- mysite/tests/unit
- othermodule/tests/unit
-
-
-
-
-
-
-You can run with this XML configuration simply by invoking `phpunit --configuration phpunit-unittests-only.xml`.
-
-The same effect can be achieved with the `--group` argument and some PHPDoc (see [phpunit.de](http://www.phpunit.de/manual/current/en/appendixes.configuration.html#appendixes.configuration.groups)).
-
-## Speeding up your test execution with the SQLite3 module
-
-Test execution can easily take a couple of minutes for a full run,
-particularly if you have a lot of database write operations.
-This is a problem when you're trying to to "[Test Driven Development](http://en.wikipedia.org/wiki/Test-driven_development)".
-
-To speed things up a bit, you can simply use a faster database just for executing tests.
-The SilverStripe database layer makes this relatively easy, most likely
-you won't need to adjust any project code or alter SQL statements.
-
-The [SQLite3 module](http://www.silverstripe.org/sqlite-database/) provides an interface
-to a very fast database that requires minimal setup and is fully file-based.
-It should give you up to 4x speed improvements over running tests in MySQL or other
-more "heavy duty" relational databases.
-
-Example `mysite/_config.php`:
-
- // Customized configuration for running with different database settings.
- // Ensure this code comes after ConfigureFromEnv.php
- if(Director::isDev()) {
- if(isset($_GET['db']) && ($db = $_GET['db'])) {
- global $databaseConfig;
- if($db == 'sqlite3') $databaseConfig['type'] = 'SQLite3Database';
- }
- }
-
-You can either use the database on a single invocation:
-
- phpunit framework/tests "" db=sqlite3
-
-or through a `` flag in your `phpunit.xml` (see [Appenix C: "Setting PHP INI settings"](http://www.phpunit.de/manual/current/en/appendixes.configuration.html)):
-
-
-
-
-
-
-
-
-Note that on every test run, the manifest is flushed to avoid any bugs where a test doesn't clean up after
-itself properly. You can override that behaviour by passing `flush=0` to the test command:
-
- phpunit framework/tests flush=0
-
-Alternatively, you can set the var in your `phpunit.xml` file:
-
-
-
-
-
-
-
-
-
-It is recommended that you still run your tests with the original database driver (at least on continuous integration)
-to ensure a realistic test scenario.
-
diff --git a/docs/en/02_Developer_Guides/06_Testing/02_Behavior_Testing.md b/docs/en/02_Developer_Guides/06_Testing/02_Behavior_Testing.md
new file mode 100644
index 000000000..7d4686b0f
--- /dev/null
+++ b/docs/en/02_Developer_Guides/06_Testing/02_Behavior_Testing.md
@@ -0,0 +1,7 @@
+title: Behavior Testing
+summary: Describe how your application should behave in plain text and run tests in a browser.
+
+# Behavior Testing
+
+For behavior testing in SilverStripe, check out
+[SilverStripe Behat Documentation](https://github.com/silverstripe-labs/silverstripe-behat-extension/).
diff --git a/docs/en/02_Developer_Guides/06_Testing/02_Creating_a_Unit_Test.md b/docs/en/02_Developer_Guides/06_Testing/02_Creating_a_Unit_Test.md
deleted file mode 100644
index 7d2126894..000000000
--- a/docs/en/02_Developer_Guides/06_Testing/02_Creating_a_Unit_Test.md
+++ /dev/null
@@ -1,64 +0,0 @@
-# Creating a SilverStripe Test
-
-A test is created by extending one of two classes, SapphireTest and FunctionalTest.
-You would subclass `[api:SapphireTest]` to test your application logic,
-for example testing the behaviour of one of your `[DataObjects](api:DataObject)`,
-whereas `[api:FunctionalTest]` is extended when you want to test your application's functionality,
-such as testing the results of GET and POST requests,
-and validating the content of a page. FunctionalTest is a subclass of SapphireTest.
-
-## Creating a test from SapphireTest
-
-Here is an example of a test which extends SapphireTest:
-
- :::php
- 'home',
- 'staff' => 'my-staff',
- 'about' => 'about-us',
- 'staffduplicate' => 'my-staff-2'
- );
-
- foreach($expectedURLs as $fixture => $urlSegment) {
- $obj = $this->objFromFixture('Page', $fixture);
- $this->assertEquals($urlSegment, $obj->URLSegment);
- }
- }
- }
-
-Firstly we define a static member `$fixture_file`, this should point to a file that represents the data we want to test,
-represented in YAML. When our test is run, the data from this file will be loaded into a test database for our test to use.
-This property can be an array of strings pointing to many .yml files, but for our test we are just using a string on its
-own. For more detail on fixtures, see [this page](fixtures).
-
-The second part of our class is the `testURLGeneration` method. This method is our test. You can asign many tests, but
-again for our purposes there is just the one. When the test is executed, methods prefixed with the word `test` will be
-run. The test database is rebuilt every time one of these methods is run.
-
-Inside our test method is the `objFromFixture` method that will generate an object for us based on data from our fixture
-file. To identify to the object, we provide a class name and an identifier. The identifier is specified in the YAML file
-but not saved in the database anywhere, `objFromFixture` looks the `[api:DataObject]` up in memory rather than using the
-database. This means that you can use it to test the functions responsible for looking up content in the database.
-
-The final part of our test is an assertion command, `assertEquals`. An assertion command allows us to test for something
-in our test methods (in this case we are testing if two values are equal). A test method can have more than one assertion
-command, and if any one of these assertions fail, so will the test method.
-
-For more information on PHPUnit's assertions see the [PHPUnit manual](http://www.phpunit.de/manual/current/en/api.html#api.assert).
-
-The `[api:SapphireTest]` class comes with additional assertions which are more specific to Sapphire, for example the
-`assertEmailSent` method, which simulates sending emails through the `Email->send()`
-API without actually using a mail server. For more details on this see the [testing emails](testing-email) guide.
diff --git a/docs/en/02_Developer_Guides/06_Testing/03_Creating_a_Functional_Test.md b/docs/en/02_Developer_Guides/06_Testing/03_Creating_a_Functional_Test.md
deleted file mode 100644
index 23e963264..000000000
--- a/docs/en/02_Developer_Guides/06_Testing/03_Creating_a_Functional_Test.md
+++ /dev/null
@@ -1,69 +0,0 @@
-# Creating a functional tests
-
-Functional tests test your controllers. The core of these are the same as unit tests:
-
-* Create a subclass of `[api:SapphireTest]` in the `mysite/tests` or `(module)/tests` folder.
-* Define static $fixture_file to point to a database YAML file.
-* Create methods that start with "test" to create your tests.
-* Assertions are used to work out if a test passed or failed.
-
-The code of the tests is a little different. Instead of examining the behaviour of objects, we example the results of
-URLs. Here is an example from the subsites module:
-
- :::php
- class SubsiteAdminTest extends SapphireTest {
- private static $fixture_file = 'subsites/tests/SubsiteTest.yml';
-
- /**
- * Return a session that has a user logged in as an administrator
- */
- public function adminLoggedInSession() {
- return Injector::inst()->create('Session', array(
- 'loggedInAs' => $this->idFromFixture('Member', 'admin')
- ));
- }
-
- /**
- * Test generation of the view
- */
- public function testBasicView() {
- // Open the admin area logged in as admin
- $response1 = Director::test('admin/subsites/', null, $this->adminLoggedInSession());
-
- // Confirm that this URL gets you the entire page, with the edit form loaded
- $response2 = Director::test('admin/subsites/show/1', null, $this->adminLoggedInSession());
- $this->assertTrue(strpos($response2->getBody(), 'id="Root_Configuration"') !== false);
- $this->assertTrue(strpos($response2->getBody(), ' 1), $this->adminLoggedInSession());
-
- $this->assertTrue(strpos($response3->getBody(), 'id="Root_Configuration"') !== false);
- $this->assertTrue(strpos($response3->getBody(), '