node1 = new TreeViewNode('Name'); //Node 2 gets values for all arguments $this->node2 = new TreeViewNode('Name', 'www.foo.bar', $sub_nodes); } public function testConstructor() { //A node without things should have null values on its properties: $this->assertNull($this->node1->getHref()); $this->assertNull($this->node1->getNodes()); $this->assertEquals('Name', $this->node1->getText()); //The second node must have the given things as properties. $this->assertEquals('Name',$this->node2->getText()); $this->assertEquals('www.foo.bar', $this->node2->getHref()); $this->assertNotEmpty($this->node2->getNodes()); } }