CommerceGuys\Addressing\Subdivision\LazySubdivisionCollection::getRepository PHP Method

getRepository() public method

Gets the subdivision repository.
public getRepository ( ) : CommerceGuys\Addressing\Subdivision\SubdivisionRepositoryInterface
return CommerceGuys\Addressing\Subdivision\SubdivisionRepositoryInterface The subdivision repository.
    public function getRepository()
    {
        return $this->repository;
    }

Usage Example

 /**
  * @covers ::getRepository
  * @covers ::setRepository
  */
 public function testRepository()
 {
     $subdivisionRepository = $this->getMockBuilder('CommerceGuys\\Addressing\\Subdivision\\SubdivisionRepository')->disableOriginalConstructor()->getMock();
     $this->collection->setRepository($subdivisionRepository);
     $this->assertSame($subdivisionRepository, $this->collection->getRepository());
 }