-
Notifications
You must be signed in to change notification settings - Fork 334
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MNT Correct test SilverStripeNavigatorItems.
- Loading branch information
1 parent
c02549c
commit 3a990c9
Showing
5 changed files
with
292 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
tests/php/Controllers/SilverStripeNavigatorTest/UnversionedRecord.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?php | ||
|
||
namespace SilverStripe\CMS\Tests\Controllers\SilverStripeNavigatorTest; | ||
|
||
use SilverStripe\Dev\TestOnly; | ||
use SilverStripe\ORM\CMSPreviewable; | ||
use SilverStripe\ORM\DataObject; | ||
use SilverStripe\Versioned\Versioned; | ||
|
||
class UnversionedRecord extends DataObject implements TestOnly, CMSPreviewable | ||
{ | ||
private static $table_name = 'SilverStripeNavigatorTest_UnversionedRecord'; | ||
|
||
private static $show_stage_link = true; | ||
|
||
private static $show_live_link = true; | ||
|
||
private static $show_unversioned_preview_link = true; | ||
|
||
public $previewLinkTestProperty = null; | ||
|
||
public function PreviewLink($action = null) | ||
{ | ||
return $this->previewLinkTestProperty; | ||
} | ||
|
||
public function getMimeType() | ||
{ | ||
return 'text/html'; | ||
} | ||
|
||
public function CMSEditLink() | ||
{ | ||
return null; | ||
} | ||
} |
42 changes: 42 additions & 0 deletions
42
tests/php/Controllers/SilverStripeNavigatorTest/VersionedRecord.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<?php | ||
|
||
namespace SilverStripe\CMS\Tests\Controllers\SilverStripeNavigatorTest; | ||
|
||
use SilverStripe\Dev\TestOnly; | ||
use SilverStripe\ORM\CMSPreviewable; | ||
use SilverStripe\ORM\DataObject; | ||
use SilverStripe\Versioned\Versioned; | ||
|
||
class VersionedRecord extends DataObject implements TestOnly, CMSPreviewable | ||
{ | ||
private static $table_name = 'SilverStripeNavigatorTest_VersionedRecord'; | ||
|
||
private static $show_stage_link = true; | ||
|
||
private static $show_live_link = true; | ||
|
||
private static $show_unversioned_preview_link = true; | ||
|
||
private static $db = [ | ||
'PreviewLinkTestProperty' => 'Text', | ||
]; | ||
|
||
private static $extensions = [ | ||
Versioned::class, | ||
]; | ||
|
||
public function PreviewLink($action = null) | ||
{ | ||
return $this->PreviewLinkTestProperty; | ||
} | ||
|
||
public function getMimeType() | ||
{ | ||
return 'text/html'; | ||
} | ||
|
||
public function CMSEditLink() | ||
{ | ||
return null; | ||
} | ||
} |
Oops, something went wrong.