コード例 #1
0
 public function testExtract()
 {
     $group = (new GroupEntity())->setId(2);
     $data = $this->repository->extract($group);
     $this->assertArrayHasKey('id', $data);
     $this->assertEquals(2, $data['id']);
 }
コード例 #2
0
 public function deleteRow(array $row)
 {
     if (!isset($row['id'])) {
         throw new \InvalidArgumentException('$entity should contain ID key for delete action');
     }
     $group = $this->groupRepository->find($row['id']);
     $this->groupRepository->delete($group);
 }