Skip to content

Commit

Permalink
Merge pull request #175 from cakephp/migrations-name
Browse files Browse the repository at this point in the history
Camelize migration filename
  • Loading branch information
lorenzo committed Dec 25, 2015
2 parents 15d246c + 3a533c0 commit 27d6576
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Shell/Task/SimpleMigrationTask.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public function name()
public function fileName($name)
{
$name = $this->getMigrationName($name);
return Util::mapClassNameToFileName($name);
return Util::getCurrentTimestamp() . '_' . Inflector::camelize($name) . '.php';
}

/**
Expand Down
2 changes: 2 additions & 0 deletions tests/TestCase/Shell/Task/MigrationSnapshotTaskTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ public function testNotEmptySnapshot()
$bakeName = $this->getBakeName('TestNotEmptySnapshot');
$result = $this->Task->bake($bakeName);

$this->assertNotEmpty(glob($this->Task->getPath() . '*_TestNotEmptySnapshot*.php'));
$this->assertCorrectSnapshot($bakeName, $result);
}

Expand All @@ -112,6 +113,7 @@ public function testAutoIdDisabledSnapshot()
$bakeName = $this->getBakeName('TestAutoIdDisabledSnapshot');
$result = $this->Task->bake($bakeName);

$this->assertNotEmpty(glob($this->Task->getPath() . '*_TestAutoIdDisabledSnapshot*.php'));
$this->assertCorrectSnapshot($bakeName, $result);
}

Expand Down

0 comments on commit 27d6576

Please sign in to comment.