toCollection() public method

Get all modules as collection instance.
public toCollection ( ) : Collection
return Collection
 /** @test */
 public function it_returns_a_collection()
 {
     $this->repository->addLocation(__DIR__ . '/stubs');
     $this->assertInstanceOf(Collection::class, $this->repository->toCollection());
     $this->assertInstanceOf(Collection::class, $this->repository->collections());
 }