-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from gruberro/disallow-empty-contexts
Disallow empty contexts
- Loading branch information
Showing
3 changed files
with
68 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
tests/Console/Command/EmptyContextualMigrations/MigrationA.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?php declare(strict_types=1); | ||
|
||
namespace TestMigrations\ContextualMigrations; | ||
|
||
use Gruberro\MongoDbMigrations; | ||
use MongoDB\Database; | ||
|
||
class MigrationA implements MongoDbMigrations\MigrationInterface, MongoDbMigrations\ContextualMigrationInterface | ||
{ | ||
public function getId(): string | ||
{ | ||
return 'some-context-migration'; | ||
} | ||
|
||
public function getCreateDate(): \DateTime | ||
{ | ||
return new \DateTime('2016-02-25 16:30:00'); | ||
} | ||
|
||
public function execute(Database $db) | ||
{ | ||
} | ||
|
||
public function getContexts(): array | ||
{ | ||
return []; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters