title: No provider for Platform
body: <p>So I have come across this issue making a unit test for an Angular 4 application </p>
  
  <p>What happens is that it keeps giving the error stated here in the question title.</p>
  
  <p>I tried to google it, tried to import a whole bunch of different modules and finally found that a close answer to what this "Platform" is might be the browserModule from <code>@angular/browser</code> Platform.</p>
  
  <p>So in my unit testing, I tried to import it and declare it but it did not help.</p>
  
  <p>Can anyone please help with this as I'm not even sure what this "Platform" is?</p>
  
  <p>Question: what is exactly this "Platform" in the error and how to fix it?</p>
  
  <p>Thanks.</p>
  
  <p>I have attached my code as below:</p>
  
  <pre><code>import { ComponentFixture, TestBed, async} from "@angular/core/testing";
  import { DebugElement, CUSTOM_ELEMENTS_SCHEMA, PlatformRef} from 
  "@angular/core";
  import { TeamCreationAssignmentComponent } from "./team-creation-assignment.component";
  import { OdmService } from "../../services/odm/odm.service";
  import { UserNotificationService } from "../../services/user/user-notification.service";
  import { MatSnackBar } from "@angular/material";
  import { OVERLAY_PROVIDERS, ScrollStrategyOptions, ScrollDispatcher} from "@angular/cdk/overlay";
  
  describe('Team creation assignment component', () =&gt; {
  let comp: TeamCreationAssignmentComponent;
  let fixture: ComponentFixture&lt;TeamCreationAssignmentComponent&gt;;
  
  let odmServiceSub = {};
  
  
  beforeEach(async(() =&gt; {
      TestBed.configureTestingModule({
  
          declarations: [TeamCreationAssignmentComponent],
          //imports: [BrowserModule],
          schemas: [CUSTOM_ELEMENTS_SCHEMA],
          providers: [
              {provide: OdmService, useValue: odmServiceSub}, 
              UserNotificationService, 
              MatSnackBar, 
              OVERLAY_PROVIDERS, 
              ScrollStrategyOptions,
              ScrollDispatcher,
          ],
      })
      .compileComponents();
  }));
  
  beforeEach(() =&gt; {
      fixture = TestBed.createComponent(TeamCreationAssignmentComponent);
      comp = fixture.componentInstance;
  });
  
  it('should have defined component', () =&gt; {
      expect(comp).toBeDefined();
  })
  </code></pre>
  
  <p>});</p>