/**
  * testGetTraitDelegatesToContextGetTraitMethod
  *
  * @return void
  */
 public function testGetTraitDelegatesToContextGetTraitMethod()
 {
     $context = $this->getMock(PHP_Depend_Builder_Context::CLAZZ);
     $context->expects($this->once())->method('getTrait')->with($this->equalTo(__CLASS__));
     $reference = new PHP_Depend_Code_ASTTraitReference($context, __CLASS__);
     $reference->getType();
 }
 /**
  * Collects all directly defined methods or method aliases for the given
  * {@link PHP_Depend_Code_ASTTraitReference}
  *
  * @param PHP_Depend_Code_ASTTraitReference $reference Context trait reference.
  *
  * @return void
  */
 private function collectMethods(PHP_Depend_Code_ASTTraitReference $reference)
 {
     foreach ($reference->getType()->getAllMethods() as $method) {
         foreach ($this->getAliasesFor($method) as $alias) {
             $this->allMethods[] = $alias;
         }
     }
 }