public function test_adding_the_same_instance_should_add_just_a_single_reference()
 {
     $composite = new AttributeException();
     $node = new IntException();
     $composite->addRelated($node);
     $composite->addRelated($node);
     $composite->addRelated($node);
     $this->assertEquals(1, count($composite->getRelated(true)));
     $this->assertContainsOnly($node, $composite->getRelated());
 }
 public function testAddingTheSameInstanceShouldAddJustASingleReference()
 {
     $composite = new AttributeException();
     $node = new IntException();
     $composite->addRelated($node);
     $composite->addRelated($node);
     $composite->addRelated($node);
     $this->assertEquals(1, count($composite->getRelated(true)));
     $this->assertContainsOnly($node, $composite->getRelated());
 }