ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
ilTestTaxonomyTreeTest.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
26 {
28 
29  protected function setUp(): void
30  {
31  parent::setUp();
32 
33  $db_mock = $this->createMock(ilDBInterface::class);
34  $returnValue = new stdClass();
35  $returnValue->child = 1;
36  $db_mock->expects($this->once())
37  ->method("fetchObject")
38  ->willReturn($returnValue);
39 
40  $this->setGlobalVariable("ilDB", $db_mock);
42 
43  $this->testObj = new ilTestTaxonomyTree(0);
44  }
45 
47  {
48  $this->assertInstanceOf(ilTestTaxonomyTree::class, $this->testObj);
49  }
50 }
setGlobalVariable(string $name, $value)
Class ilTestBaseClass.
Class ilTestTaxonomyTreeTest.