-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add test to verify that either files or git options are set.
- Loading branch information
1 parent
d206afc
commit ac52ed0
Showing
4 changed files
with
56 additions
and
18 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<phpunit backupGlobals="false" | ||
backupStaticAttributes="false" | ||
colors="true" | ||
convertErrorsToExceptions="true" | ||
convertNoticesToExceptions="true" | ||
convertWarningsToExceptions="true" | ||
processIsolation="false" | ||
stopOnFailure="false" | ||
syntaxCheck="false" | ||
bootstrap="vendor/autoload.php"> | ||
|
||
<testsuites> | ||
<testsuite name="Integration tests"> | ||
<directory>tests/integration</directory> | ||
</testsuite> | ||
</testsuites> | ||
|
||
</phpunit> |
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
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
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,26 @@ | ||
<?php | ||
|
||
namespace JMOlivas\Phpqa\Command; | ||
|
||
use JMOlivas\Phpqa\Console\Application; | ||
use PHPUnit_Framework_TestCase as TestCase; | ||
use Symfony\Component\Console\Tester\CommandTester; | ||
|
||
class AnalyzeCommandTest extends TestCase | ||
{ | ||
/** | ||
* @test | ||
* @expectedException \Exception | ||
* @expectedExceptionMessage You must set `files` or `git` options. | ||
*/ | ||
function it_should_throw_exception_if_neither_files_nor_git_options_are_provided() | ||
{ | ||
$application = new Application(); | ||
$command = new AnalyzeCommand(); | ||
$command->setApplication($application); | ||
|
||
$tester = new CommandTester($command); | ||
|
||
$tester->execute([]); | ||
} | ||
} |