public function testReturnsCompleteMigrationObject()
 {
     $pdo = $this->aNewInitializedSchema();
     $logMigration = new LogMigration($pdo);
     $logMigration->logSuccess(MigrationFileMockFactory::mockMigrationFile("v0_test.sql", "hash0"));
     $migration = (new LoadMigrations($pdo))->allInstalledMigrations()[0];
     $this->assertEquals("1", $migration->getId());
     $this->assertTrue($migration->getInstalledAt() instanceof \DateTime);
     $this->assertEquals("v0_test.sql", $migration->getFilename());
     $this->assertEquals("hash0", $migration->getChecksum());
     $this->assertEquals(true, $migration->getSuccess());
 }
 /** @expectedException \dbmigrate\application\MigrationException */
 public function testIdentifiesBrokenChecksum()
 {
     $this->installedMigrations->needsToBeInstalled(MigrationFileMockFactory::mockMigrationFile("v1.sql", "otherchecksum"));
 }
 public function setUp()
 {
     $this->pdo = $this->aNewInitializedSchema();
     $this->mock = MigrationFileMockFactory::mockMigrationFile("v0_test.sql", "hash");
 }