コード例 #1
0
 public function testGetRightTree()
 {
     $obj_binaryTree = new BinaryTree('content', new BinaryTree('content L'), new BinaryTree('content R'));
     $this->assertEquals('content R', $obj_binaryTree->getRightTree()->getObject(), 'Right tree\'s content should equal content R.');
     $obj_binaryTreeEmpty = new BinaryTree();
     $this->assertNull($obj_binaryTreeEmpty->getRightTree(), 'Right tree should be null.');
 }