Ejemplo n.º 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));
 }
Ejemplo n.º 2
0
 /**
  * Returns true, if repository contains record
  *
  * @param  string $id
  * @return bool
  */
 public function isInRepository($id)
 {
     return $this->repository->hasByInternalId($id);
 }