コード例 #1
0
ファイル: RepositoryTest.php プロジェクト: sigma-z/dive
 /**
  * @dataProvider provideExistingFlag
  */
 public function testGetByInternalId($exist)
 {
     $record = $this->table->createRecord(array('id' => 7, 'username' => 'Bart'), $exist);
     $id = $record->getInternalId();
     $isInRepository = $this->repository->hasByInternalId($id);
     $this->assertTrue($isInRepository);
     $this->assertEquals($record, $this->repository->getByInternalId($id));
 }
コード例 #2
0
ファイル: Table.php プロジェクト: sigma-z/dive
 /**
  * Returns true, if repository contains record
  *
  * @param  string $id
  * @return bool
  */
 public function isInRepository($id)
 {
     return $this->repository->hasByInternalId($id);
 }