Drop SQLite support (#2405)

This commit is contained in:
Kevin Papst
2021-03-08 16:06:22 +01:00
committed by GitHub
parent 70f7f35009
commit 30ac5e4c24
78 changed files with 1165 additions and 1596 deletions

View File

@@ -181,7 +181,7 @@ class TimesheetControllerTest extends ControllerBaseTest
$em = $this->getEntityManager();
/** @var Timesheet $timesheet */
$timesheet = $em->getRepository(Timesheet::class)->find(1);
$timesheet = $em->getRepository(Timesheet::class)->findAll()[0];
$this->assertInstanceOf(\DateTime::class, $timesheet->getBegin());
$this->assertNull($timesheet->getEnd());
$this->assertEquals('Testing is fun!', $timesheet->getDescription());
@@ -218,7 +218,7 @@ class TimesheetControllerTest extends ControllerBaseTest
$em = $this->getEntityManager();
/** @var Timesheet $timesheet */
$timesheet = $em->getRepository(Timesheet::class)->find(1);
$timesheet = $em->getRepository(Timesheet::class)->findAll()[0];
$this->assertInstanceOf(\DateTime::class, $timesheet->getBegin());
$this->assertInstanceOf(\DateTime::class, $timesheet->getEnd());
$this->assertEquals($expectedDuration, $timesheet->getDuration());
@@ -293,7 +293,7 @@ class TimesheetControllerTest extends ControllerBaseTest
$em = $this->getEntityManager();
/** @var Timesheet $timesheet */
$timesheet = $em->getRepository(Timesheet::class)->find(1);
$timesheet = $em->getRepository(Timesheet::class)->findAll()[0];
$this->assertInstanceOf(\DateTime::class, $timesheet->getBegin());
$this->assertInstanceOf(\DateTime::class, $timesheet->getEnd());
$this->assertEquals(50, $timesheet->getRate());
@@ -327,7 +327,7 @@ class TimesheetControllerTest extends ControllerBaseTest
$em = $this->getEntityManager();
/** @var Timesheet $timesheet */
$timesheet = $em->getRepository(Timesheet::class)->find(1);
$timesheet = $em->getRepository(Timesheet::class)->findAll()[0];
$this->assertInstanceOf(\DateTime::class, $timesheet->getBegin());
$this->assertInstanceOf(\DateTime::class, $timesheet->getEnd());
$this->assertEquals(50, $timesheet->getRate());
@@ -428,7 +428,7 @@ class TimesheetControllerTest extends ControllerBaseTest
$em = $this->getEntityManager();
/** @var Timesheet $timesheet */
$timesheet = $em->getRepository(Timesheet::class)->find(1);
$timesheet = $em->getRepository(Timesheet::class)->findAll()[0];
$this->assertInstanceOf(\DateTime::class, $timesheet->getBegin());
$this->assertInstanceOf(\DateTime::class, $timesheet->getEnd());
$this->assertEquals(800, $timesheet->getRate());
@@ -450,9 +450,10 @@ class TimesheetControllerTest extends ControllerBaseTest
$fixture->setAmount(10);
$fixture->setUser($this->getUserByRole(User::ROLE_USER));
$fixture->setStartDate('2017-05-01');
$this->importFixture($fixture);
$timesheets = $this->importFixture($fixture);
$id = $timesheets[0]->getId();
$this->request($client, '/timesheet/1/edit');
$this->request($client, '/timesheet/' . $id . '/edit');
$response = $client->getResponse();
$this->assertTrue($response->isSuccessful());
@@ -478,7 +479,7 @@ class TimesheetControllerTest extends ControllerBaseTest
$em = $this->getEntityManager();
/** @var Timesheet $timesheet */
$timesheet = $em->getRepository(Timesheet::class)->find(1);
$timesheet = $em->getRepository(Timesheet::class)->find($id);
$this->assertEquals('foo-bar', $timesheet->getDescription());
}