mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge pull request #6399 from robbieaverill/patch-5
Update 00_Write_a_SapphireTest.md
This commit is contained in:
commit
734fe5d8e4
@ -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',
|
||||||
|
Loading…
Reference in New Issue
Block a user