Passed
Push — master ( d1daa0...b27186 )
by Lucien
01:58
created

PluginToolsTest::testRefreshLoadedPlugins()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 0
1
<?php
2
3
use PHPUnit\Framework\TestCase;
4
use TwinDigital\WPTools\PluginTools;
5
6
class PluginToolsTest extends TestCase {
7
8
  /**
9
   * Instance of the class.
10
   *
11
   * @var \TwinDigital\WPTools\PluginTools $class
12
   */
13
  public $class;
14
15
  /**
16
   * Tests if the plugin_list is loaded.
17
   *
18
   * @covers PluginTools::loadPluginList()
19
   * @return void
20
   */
21
  public function testLoadPluginList() {
22
    $this->assertNotCount(0, PluginTools::$loadedPlugins, 'Pluginlist is empty, probably failed loading the list of plugins.');
23
  }
24
  /**
25
   * Tests if the plugin_list is loaded.
26
   *
27
   * @covers PluginTools::loadPluginList()
28
   * @return void
29
   */
30
  public function testLoadPluginListForced() {
31
    $this->assertNotCount(0, PluginTools::$loadedPlugins, 'Pluginlist is empty, probably failed loading the list of plugins.');
32
  }
33
34
  public function testRefreshLoadedPlugins() {
35
    PluginTools::$loadedPlugins = null;
36
    PluginTools::refreshLoadedPlugins();
37
    $this->assertNotCount(0, PluginTools::$loadedPlugins, 'Pluginlist is empty, probably failed loading the list of plugins.');
38
  }
39
40
  public function setUp() {
41
    $this->class = PluginTools::class;
0 ignored issues
show
Documentation Bug introduced by
It seems like TwinDigital\WPTools\PluginTools::class of type string is incompatible with the declared type TwinDigital\WPTools\PluginTools of property $class.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
42
  }
43
44
  public function tearDown() {
45
    parent::tearDown();
46
  }
47
}
48