-
Notifications
You must be signed in to change notification settings - Fork 18
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
Marco Hermo
committed
Apr 4, 2024
1 parent
188f6bd
commit 45775e0
Showing
9 changed files
with
150 additions
and
75 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,17 @@ | ||
<phpunit bootstrap="vendor/silverstripe/framework/tests/bootstrap.php" colors="true"> | ||
<testsuite name="Default"> | ||
<directory>tests/</directory> | ||
</testsuite> | ||
<filter> | ||
<whitelist processUncoveredFilesFromWhitelist="true"> | ||
<directory suffix=".php">src/</directory> | ||
<exclude> | ||
<directory suffix=".php">tests/</directory> | ||
</exclude> | ||
</whitelist> | ||
</filter> | ||
<?xml version="1.0"?> | ||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" bootstrap="vendor/silverstripe/framework/tests/bootstrap.php" colors="true" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"> | ||
<coverage processUncoveredFiles="true"> | ||
<include> | ||
<directory suffix=".php">src/</directory> | ||
</include> | ||
<exclude> | ||
<directory suffix=".php">tests/</directory> | ||
</exclude> | ||
</coverage> | ||
<testsuite name="Default"> | ||
<directory>tests/</directory> | ||
</testsuite> | ||
<php> | ||
<get name="flush" value="1"/> | ||
</php> | ||
</phpunit> |
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
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,31 @@ | ||
<?php | ||
|
||
namespace SilverStripe\SearchService\Tests\Fake; | ||
|
||
use Page; | ||
use SilverStripe\Dev\TestOnly; | ||
use SilverStripe\SearchService\Extensions\SearchServiceExtension; | ||
|
||
class PageFake extends Page implements TestOnly | ||
{ | ||
|
||
private static array $many_many = [ | ||
'Tags' => TagFake::class, | ||
]; | ||
|
||
private static array $has_many = [ | ||
'Images' => ImageFake::class, | ||
]; | ||
|
||
private static array $owns = [ | ||
'Tags', | ||
'Images', | ||
]; | ||
|
||
private static string $table_name = 'PageFake'; | ||
|
||
private static array $extensions = [ | ||
SearchServiceExtension::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
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 |
---|---|---|
@@ -1,31 +1,75 @@ | ||
SilverStripe\SearchService\Tests\Fake\TagFake: | ||
four: | ||
Title: Tag four | ||
five: | ||
Title: Tag five | ||
six: | ||
Title: Tag six | ||
|
||
SilverStripe\SearchService\Tests\Fake\ImageFake: | ||
three: | ||
Title: Image Fake Three | ||
URL: "/image-three/" | ||
Tags: =>SilverStripe\SearchService\Tests\Fake\TagFake.four,=>SilverStripe\SearchService\Tests\Fake\TagFake.five | ||
four: | ||
Title: Image Fake Four | ||
URL: "/image-four/" | ||
Tags: =>SilverStripe\SearchService\Tests\Fake\TagFake.five,=>SilverStripe\SearchService\Tests\Fake\TagFake.six | ||
five: | ||
Title: Image Fake Five | ||
URL: "/image-five/" | ||
Tags: =>SilverStripe\SearchService\Tests\Fake\TagFake.six | ||
|
||
Page: | ||
page1: | ||
Title: Parent Page | ||
Title: Parent Page 1 | ||
ShowInSearch: 1 | ||
page2: | ||
Title: Child Page 1 | ||
Title: Child of Parent Page 1 - A | ||
Parent: =>Page.page1 | ||
ShowInSearch: 1 | ||
page3: | ||
Title: Child Page 2 | ||
Title: Child of Parent Page 1 - B | ||
Parent: =>Page.page1 | ||
ShowInSearch: 1 | ||
page4: | ||
Title: Parent Page 2 | ||
ShowInSearch: 1 | ||
page5: | ||
Title: Child Page 3 | ||
Title: Child of Parent Page 2 - A | ||
Parent: =>Page.page4 | ||
ShowInSearch: 1 | ||
page6: | ||
Title: Subsite Page 1 | ||
Subsite: =>SilverStripe\Subsites\Model\Subsite.subsite1 | ||
ShowInSearch: 1 | ||
page7: | ||
Title: Grandchild Page 1 | ||
Title: Grandchild of Parent Page 1 - A1 | ||
Parent: =>Page.page2 | ||
ShowInSearch: 1 | ||
page8: | ||
Title: Grandchild Page 2 | ||
Title: Grandchild of Parent Page 1 - A2 | ||
Parent: =>Page.page2 | ||
ShowInSearch: 1 | ||
|
||
SilverStripe\SearchService\Tests\Fake\PageFake: | ||
page9: | ||
Title: Child of Parent Page 2 - B | ||
Parent: =>Page.page4 | ||
Banner: =>SilverStripe\SearchService\Tests\Fake\ImageFake.five | ||
Tags: =>SilverStripe\SearchService\Tests\Fake\TagFake.four,=>SilverStripe\SearchService\Tests\Fake\TagFake.five | ||
Images: =>SilverStripe\SearchService\Tests\Fake\ImageFake.three | ||
ShowInSearch: 1 | ||
page10: | ||
Title: Grandchild of Parent Page 2 - B1 | ||
Parent: =>SilverStripe\SearchService\Tests\Fake\PageFake.page9 | ||
Banner: =>SilverStripe\SearchService\Tests\Fake\ImageFake.five | ||
Tags: =>SilverStripe\SearchService\Tests\Fake\TagFake.five,=>SilverStripe\SearchService\Tests\Fake\TagFake.six | ||
Images: =>SilverStripe\SearchService\Tests\Fake\ImageFake.four | ||
ShowInSearch: 1 | ||
page11: | ||
Title: Great Grandchild of Parent Page 2 - B1 - One | ||
Parent: =>SilverStripe\SearchService\Tests\Fake\PageFake.page10 | ||
Banner: =>SilverStripe\SearchService\Tests\Fake\ImageFake.five | ||
Tags: =>SilverStripe\SearchService\Tests\Fake\TagFake.four,=>SilverStripe\SearchService\Tests\Fake\TagFake.six | ||
ShowInSearch: 1 |