-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #89 from Icinga/improve-tests
Extend TLVTree tests
- Loading branch information
Showing
8 changed files
with
149 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?php | ||
|
||
namespace Tests\Icinga\Module\Toplevelview; | ||
|
||
use Icinga\Module\Toplevelview\Tree\TLVTreeNode; | ||
|
||
use PHPUnit\Framework\TestCase; | ||
|
||
final class TLVTreeNodeTest extends TestCase | ||
{ | ||
public function testGetTitle() | ||
{ | ||
$n = new TLVTreeNode(); | ||
|
||
$n->setProperties(['name' => 'bar']); | ||
$this->assertSame('bar', $n->getTitle()); | ||
|
||
$this->assertSame(['name' => 'bar'], $n->getProperties()); | ||
|
||
$n->set('name', 'foo'); | ||
$this->assertSame('foo', $n->getTitle()); | ||
} | ||
|
||
public function testGetBreadCrumb() | ||
{ | ||
$n = new TLVTreeNode(); | ||
$this->assertSame([$n], $n->getBreadCrumb()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters