SolrCoreServiceExtensionTest::testCoreIsActive()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 11
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 4
Bugs 0 Features 0
Metric Value
eloc 6
c 4
b 0
f 0
dl 0
loc 11
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
4
namespace Firesphere\SolrCompatibility\Tests;
5
6
use Firesphere\SolrCompatibility\Extensions\SolrCoreServiceExtension;
7
use Firesphere\SolrSearch\Services\SolrCoreService;
8
use SilverStripe\Dev\SapphireTest;
9
10
class SolrCoreServiceExtensionTest extends SapphireTest
11
{
12
    public function testCoreIsActive()
13
    {
14
        $service = new SolrCoreService();
15
16
        $extension = new SolrCoreServiceExtension();
17
18
        $extension->setOwner($service);
19
20
        $this->assertGreaterThan(
21
            $extension->coreIsActive('CircleCITestIndex')->getUptime(),
0 ignored issues
show
Deprecated Code introduced by
The function Firesphere\SolrCompatibi...tension::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

21
            /** @scrutinizer ignore-deprecated */ $extension->coreIsActive('CircleCITestIndex')->getUptime(),

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...
22
            $service->coreStatus('CircleCITestIndex')->getUptime()
23
        );
24
    }
25
}
26