Example #1
0
 public function testCanGetLabelsOfAllAttributes()
 {
     $attribute1 = new TestCustomAttribute(1, 'a1');
     $attribute2 = new TestCustomAttribute(2, 'a2');
     $attribute3 = new TestCustomAttribute(3, 'a3');
     $list = new AttributeList();
     $list->AddDefinition($attribute1);
     $list->AddDefinition($attribute2);
     $list->AddDefinition($attribute3);
     $labels = $list->GetLabels();
     $this->assertEquals(array('a1', 'a2', 'a3'), $labels);
     $this->assertEquals(array(1 => $attribute1, 2 => $attribute2, 3 => $attribute3), $list->GetDefinitions());
 }