Passed
Push — master ( d685f8...514c5e )
by Simon
06:45
created

SolrCoreServiceExtensionTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 4
c 1
b 0
f 0
dl 0
loc 10
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A testCoreIsActive() 0 7 1
1
<?php
2
3
4
namespace Firesphere\SolrCompatibility\Tests;
5
6
7
use Firesphere\SolrSearch\Services\SolrCoreService;
8
use SilverStripe\Dev\SapphireTest;
9
10
class SolrCoreServiceExtensionTest extends SapphireTest
11
{
12
13
    public function testCoreIsActive()
14
    {
15
        $index = new \CircleCITestIndex();
0 ignored issues
show
Unused Code introduced by
The assignment to $index is dead and can be removed.
Loading history...
Bug introduced by
The type CircleCITestIndex 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...
16
17
        $class = new SolrCoreService();
18
19
        $this->assertEquals($class->coreStatus('CircleCITestIndex'), $class->coreIsActive('CircleCITestIndex'));
0 ignored issues
show
Deprecated Code introduced by
The function Firesphere\SolrSearch\Se...Service::coreIsActive() has been deprecated: backward compatibility stub ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-deprecated  annotation

19
        $this->assertEquals($class->coreStatus('CircleCITestIndex'), /** @scrutinizer ignore-deprecated */ $class->coreIsActive('CircleCITestIndex'));

This function has been deprecated. The supplier of the function has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the function will be removed and what other function to use instead.

Loading history...
20
    }
21
}
22