Skip to content

Commit 18ca7e9

Browse files
Added task to publish resources
1 parent d8209b6 commit 18ca7e9

2 files changed

Lines changed: 46 additions & 0 deletions

File tree

src/task/resource/Publish.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\resource;
4+
5+
use de\codenamephp\deployer\flow\task\AbstractFlowTask;
6+
7+
/**
8+
* Task to publish the resources to the public directory
9+
*
10+
* @see https://neos.readthedocs.io/en/stable/References/CommandReference.html#neos-flow-resource-publish
11+
*/
12+
final class Publish extends AbstractFlowTask {
13+
14+
public function getCommand() : string {
15+
return 'resource:publish';
16+
}
17+
18+
public function getArguments() : array {
19+
return [];
20+
}
21+
}

test/task/resource/PublishTest.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\resource;
4+
5+
use de\codenamephp\deployer\flow\task\resource\Publish;
6+
use PHPUnit\Framework\TestCase;
7+
8+
final class PublishTest extends TestCase {
9+
10+
private Publish $sut;
11+
12+
protected function setUp() : void {
13+
parent::setUp();
14+
15+
$this->sut = new Publish();
16+
}
17+
18+
public function testGetCommand() : void {
19+
self::assertSame('resource:publish', $this->sut->getCommand());
20+
}
21+
22+
public function testGetArguments() : void {
23+
self::assertSame([], $this->sut->getArguments());
24+
}
25+
}

0 commit comments

Comments
 (0)