-
Notifications
You must be signed in to change notification settings - Fork 125
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Increase test coverage of orderable rows
- Loading branch information
Chris Penny
committed
Jul 7, 2022
1 parent
f7b2408
commit 07fd599
Showing
6 changed files
with
161 additions
and
2 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
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 Symbiote\GridFieldExtensions\Tests\Stub; | ||
|
||
use SilverStripe\Dev\TestOnly; | ||
use SilverStripe\ORM\DataObject; | ||
use SilverStripe\ORM\ManyManyList; | ||
use SilverStripe\Versioned\Versioned; | ||
|
||
/** | ||
* @method ManyManyList|ThroughDefinerVersioned[] Definers() | ||
* @mixin Versioned | ||
*/ | ||
class ThroughBelongsVersioned extends DataObject implements TestOnly | ||
{ | ||
private static string $table_name = 'ThroughBelongsVersioned'; | ||
|
||
private static array $belongs_many_many = [ | ||
'Definers' => ThroughDefinerVersioned::class, | ||
]; | ||
|
||
private static array $extensions = [ | ||
Versioned::class, | ||
]; | ||
} |
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,33 @@ | ||
<?php | ||
|
||
namespace Symbiote\GridFieldExtensions\Tests\Stub; | ||
|
||
use SilverStripe\Dev\TestOnly; | ||
use SilverStripe\ORM\DataObject; | ||
use SilverStripe\ORM\ManyManyThroughList; | ||
use SilverStripe\Versioned\Versioned; | ||
|
||
/** | ||
* @method ManyManyThroughList|ThroughIntermediaryVersioned Belongings() | ||
* @mixin Versioned | ||
*/ | ||
class ThroughDefinerVersioned extends DataObject implements TestOnly | ||
{ | ||
private static string $table_name = 'ThroughDefinerVersioned'; | ||
|
||
private static array $many_many = [ | ||
'Belongings' => [ | ||
'through' => ThroughIntermediaryVersioned::class, | ||
'from' => 'Defining', | ||
'to' => 'Belonging', | ||
] | ||
]; | ||
|
||
private static array $owns = [ | ||
'Belongings' | ||
]; | ||
|
||
private static array $extensions = [ | ||
Versioned::class, | ||
]; | ||
} |
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,32 @@ | ||
<?php | ||
|
||
namespace Symbiote\GridFieldExtensions\Tests\Stub; | ||
|
||
use SilverStripe\Dev\TestOnly; | ||
use SilverStripe\ORM\DataObject; | ||
use SilverStripe\Versioned\Versioned; | ||
|
||
/** | ||
* @property int $DefiningID | ||
* @property int $BelongingID | ||
* @method ThroughDefinerVersioned Defining() | ||
* @method ThroughBelongsVersioned Belonging() | ||
* @mixin Versioned | ||
*/ | ||
class ThroughIntermediaryVersioned extends DataObject implements TestOnly | ||
{ | ||
private static string $table_name = 'ThroughIntermediaryVersioned'; | ||
|
||
private static array $db = [ | ||
'Sort' => 'Int', | ||
]; | ||
|
||
private static array $has_one = [ | ||
'Defining' => ThroughDefinerVersioned::class, | ||
'Belonging' => ThroughBelongsVersioned::class, | ||
]; | ||
|
||
private static array $extensions = [ | ||
Versioned::class, | ||
]; | ||
} |