Skip to content

Commit c84b7b3

Browse files
committed
Add tests for local deployer direct_deploy
1 parent 36759b5 commit c84b7b3

1 file changed

Lines changed: 26 additions & 0 deletions

File tree

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?php declare(strict_types=1);
2+
3+
namespace StaticDeploy;
4+
5+
use PHPUnit\Framework\TestCase;
6+
7+
final class LocalDeployTest extends TestCase {
8+
9+
use ITTrait;
10+
11+
public function testLocalDirectDeploy(): void
12+
{
13+
$this->pluginCli( [ 'addons', 'enable', 'static-deploy-addon-local' ] );
14+
$this->pluginCli( [ 'options', 'set', 'local_dirPath', '../localdeploy' ] );
15+
$this->pluginCli( [ 'direct_deploy' ] );
16+
17+
$content = $this->getLocalDeployFileContents( 'index.html' );
18+
$this->assertStringContainsString( 'Welcome to WordPress', $content );
19+
20+
$content = $this->getLocalDeployFileContents( 'robots.txt' );
21+
$this->assertStringContainsString(
22+
'Sitemap: https://example.com/wp-sitemap.xml',
23+
$content
24+
);
25+
}
26+
}

0 commit comments

Comments
 (0)