-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Maxime Rainville
committed
Sep 15, 2023
1 parent
2af595b
commit a0dae15
Showing
3 changed files
with
144 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?php | ||
|
||
namespace SilverStripe\AnyField\Tests\Extensions; | ||
|
||
use SilverStripe\Dev\SapphireTest; | ||
use SilverStripe\LinkField\Models\Link; | ||
use SilverStripe\AnyField\Extensions\Sortable; | ||
|
||
class SortableTest extends SapphireTest | ||
{ | ||
protected static $required_extensions = [ | ||
Link::class => [ | ||
Sortable::class, | ||
], | ||
]; | ||
|
||
public function testGetCMSFields() | ||
{ | ||
$link = Link::create(); | ||
$fields = $link->getCMSFields(); | ||
|
||
$this->assertNull($fields->fieldByName('Root.Main.Sort'), 'Sort field has been removed from FieldList'); | ||
$this->assertNotNull($fields->fieldByName('Root.Main.Title')); | ||
} | ||
} |
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