예제 #1
0
 /**
  * @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);
 }