title: Testing FormArray
body: <p>I have a <code>PhoneNumbersFormComponent</code> whose template looks like :</p>
  
  <pre><code>&lt;div [formGroup]="form"&gt;
      &lt;div formArrayName="numbers"&gt;
        &lt;input formControlName="countryPrefix"&gt;
        &lt;input formControlName="number"&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I want to pass the default test created by angular-cli's <code>ng g component xxx</code></p>
  
  <p>The first error I got was:</p>
  
  <blockquote>
    <p>Cannot find control with name 'countryPrefix'</p>
  </blockquote>
  
  <p>Which I solved with:</p>
  
  <pre><code>  beforeEach(() =&gt; {
      fixture = TestBed.createComponent(PhoneNumbersFormComponent);
      component = fixture.componentInstance;
      component.phoneNumbers = [];
      component.form = new FormGroup({
        countryPrefix: new FormControl(),
        number: new FormControl()
      });
      fixture.detectChanges();
    });
  </code></pre>
  
  <p>Now the last remaining error is:</p>
  
  <blockquote>
    <p>Cannot find control with name 'numbers'</p>
  </blockquote>
  
  <p>And I have no idea how to test <code>formArrayName="numbers"</code></p>