Merge pull request #6399 from robbieaverill/patch-5

Update 00_Write_a_SapphireTest.md
This commit is contained in:
Daniel Hensby 2016-12-15 15:49:28 +00:00 committed by GitHub
commit 734fe5d8e4

View File

@ -10,11 +10,13 @@ how you can load default records into the test database.
:::php :::php
<?php <?php
class PageTest extends SapphireTest { use SilverStripe\Dev\SapphireTest;
class PageTest extends SapphireTest
{
/** /**
* Defines the fixture file to use for this test class * Defines the fixture file to use for this test class
* * @var string
*/ */
protected static $fixture_file = 'SiteTreeTest.yml'; protected static $fixture_file = 'SiteTreeTest.yml';
@ -26,7 +28,8 @@ how you can load default records into the test database.
* - Generates from Title by default, unless URLSegment is explicitly set * - Generates from Title by default, unless URLSegment is explicitly set
* - Resolves duplicates by appending a number * - Resolves duplicates by appending a number
*/ */
public function testURLGeneration() { public function testURLGeneration()
{
$expectedURLs = array( $expectedURLs = array(
'home' => 'home', 'home' => 'home',
'staff' => 'my-staff', 'staff' => 'my-staff',