Issues (6)

tests/unit/DocumentFactoryExtensionTest.php (1 issue)

1
<?php
2
3
4
namespace Firesphere\SolrPermissions\Tests;
5
6
use Firesphere\SolrPermissions\Extensions\DocumentFactoryExtension;
7
use SilverStripe\Dev\Debug;
8
use SilverStripe\Dev\SapphireTest;
9
use Solarium\QueryType\Update\Query\Query;
10
11
class DocumentFactoryExtensionTest extends SapphireTest
12
{
13
    public function testUpdateDefaultFields()
14
    {
15
        $update = new Query();
16
17
        $document = $update->createDocument([]);
18
19
        $extension = new DocumentFactoryExtension();
20
        $page = new \Page();
0 ignored issues
show
The type Page was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
21
22
        $extension->updateDefaultFields($document, $page);
23
24
        $fields = $document->getFields();
25
26
        $this->assertArrayHasKey('MemberView', $fields);
27
    }
28
}
29