Skip to content

Commit d8209b6

Browse files
Added doctrine migrate task
1 parent 7714858 commit d8209b6

2 files changed

Lines changed: 46 additions & 0 deletions

File tree

src/task/doctrine/Migrate.php

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?php declare(strict_types=1);
2+
3+
namespace de\codenamephp\deployer\flow\task\doctrine;
4+
5+
use de\codenamephp\deployer\flow\task\AbstractFlowTask;
6+
7+
/**
8+
* Runs the doctrine migrations
9+
*
10+
* @see https://neos.readthedocs.io/en/stable/References/CommandReference.html#neos-flow-doctrine-migrate
11+
*/
12+
final class Migrate extends AbstractFlowTask {
13+
14+
public function getCommand() : string {
15+
return 'doctrine:migrate';
16+
}
17+
18+
public function getArguments() : array {
19+
return [];
20+
}
21+
}

test/task/doctrine/MigrateTest.php

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?php declare(strict_types=1);
2+
3+
namespace de\codenamephp\deployer\flow\test\task\doctrine;
4+
5+
use de\codenamephp\deployer\flow\task\doctrine\Migrate;
6+
use PHPUnit\Framework\TestCase;
7+
8+
final class MigrateTest extends TestCase {
9+
10+
private Migrate $sut;
11+
12+
protected function setUp() : void {
13+
parent::setUp();
14+
15+
$this->sut = new Migrate();
16+
}
17+
18+
public function testGetCommand() : void {
19+
self::assertSame('doctrine:migrate', $this->sut->getCommand());
20+
}
21+
22+
public function testGetArguments() : void {
23+
self::assertSame([], $this->sut->getArguments());
24+
}
25+
}

0 commit comments

Comments
 (0)