Skip to content

Commit

Permalink
Merge pull request #1 from alleyinteractive/travis
Browse files Browse the repository at this point in the history
  • Loading branch information
srtfisher authored Oct 5, 2020
2 parents 0749883 + ef1c917 commit 46aa2b3
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 16 deletions.
4 changes: 4 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,7 @@ end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
indent_style = tab

[*.{js,css,scss,yml,json,.babelrc}]
indent_style = space
indent_size = 2
8 changes: 3 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ sudo: false

language: php

services:
- mysql

notifications:
email: false

Expand Down Expand Up @@ -34,7 +31,8 @@ before_install:
install:
- composer install -n
- chmod 755 tests/output

script:
- composer run phpcs
- composer run phpunit
- composer run phpcs
- composer run phpunit
2 changes: 1 addition & 1 deletion phpcs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
<arg value="ps" />
<exclude-pattern>tests/</exclude-pattern>

<rule ref="Alley-Coding-Standards" />
<rule ref="vendor/alley/alley-coding-standards" />
</ruleset>
2 changes: 1 addition & 1 deletion src/class-install-command.php
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ protected function install_mantle( string $dir, InputInterface $input, OutputInt
$composer = $this->find_composer();
$commands = [
$composer . " create-project alleyinteractive/mantle-site {$mantle_dir} --remove-vcs --stability=dev --no-interaction "
. '--repository="{\"url\": \"https://github.com/alleyinteractive/mantle-site.git\", \"type\": \"vcs\"}"',
. '--repository="{\"url\": \"https://github.com/alleyinteractive/mantle.git\", \"type\": \"vcs\"}"',
];

$output->writeln( 'Installing Mantle...' );
Expand Down
24 changes: 15 additions & 9 deletions tests/test-install-command.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use PHPUnit\Framework\TestCase;
use Symfony\Component\Console\Application;
use Symfony\Component\Console\Tester\CommandTester;
use Throwable;

class Test_Install_Command extends TestCase {
public function test_install_wordpress() {
Expand All @@ -18,15 +19,20 @@ public function test_install_wordpress() {

$tester = $this->get_tester();

$status_code = $tester->execute(
[
'name' => [ 'new-site' ],
],
[
'i',
'f',
]
);
try {
$status_code = $tester->execute(
[
'name' => [ 'new-site' ],
],
[
'i',
'f',
]
);
} catch ( Throwable $e ) {
echo $tester->getDisplay( true );
throw $e;
}

$this->assertEquals( 0, $status_code );
$this->assertDirectoryExists( "{$output}/new-site" );
Expand Down

0 comments on commit 46aa2b3

Please sign in to comment.