コード例 #1
0
ファイル: IdentityMapTest.php プロジェクト: harp-orm/core
 /**
  * @covers ::__construct
  * @covers ::getRepo
  * @covers ::getModels
  */
 public function testConstruct()
 {
     $repo = new Repo(__NAMESPACE__ . '\\Model');
     $map = new IdentityMap($repo);
     $this->assertSame($repo, $map->getRepo());
     $this->assertSame([], $map->getModels());
 }
コード例 #2
0
ファイル: AbstractRepo.php プロジェクト: harp-orm/core
 /**
  * Clear IdentityMap and LinkMap
  *
  * @return AbstractRepo $this
  */
 public function clear()
 {
     $this->initializeOnce();
     $this->identityMap->clear();
     $this->linkMap->clear();
     return $this;
 }