-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from MyOnlineStore/add-scrutinzer-travis
add Scrutinizer config and Travis config
- Loading branch information
Showing
9 changed files
with
142 additions
and
42 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 |
---|---|---|
@@ -1,3 +1,10 @@ | ||
# IDE | ||
/.idea | ||
/.stfolder | ||
/.phpstorm_helpers | ||
|
||
/vendor/ | ||
/composer.lock | ||
|
||
# phpunit | ||
phpunit.xml |
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,14 @@ | ||
filter: | ||
excluded_paths: [tests/*] | ||
build: | ||
tests: | ||
override: | ||
- | ||
command: 'vendor/bin/phpunit --coverage-clover=coverage.clover' | ||
coverage: | ||
file: 'coverage.clover' | ||
format: 'clover' | ||
checks: | ||
php: | ||
code_rating: true | ||
duplication: true |
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,9 @@ | ||
language: php | ||
php: | ||
- '5.5' | ||
- '5.6' | ||
- '7.0' | ||
- '7.1' | ||
before_script: | ||
- composer self-update | ||
- composer install --prefer-source |
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,22 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<phpunit backupGlobals="false" | ||
backupStaticAttributes="false" | ||
bootstrap="vendor/autoload.php" | ||
colors="true" | ||
convertErrorsToExceptions="true" | ||
convertNoticesToExceptions="true" | ||
convertWarningsToExceptions="true" | ||
processIsolation="false" | ||
stopOnFailure="false" | ||
syntaxCheck="false"> | ||
<testsuites> | ||
<testsuite name="ViesBundle Test Suite"> | ||
<directory>./tests/</directory> | ||
</testsuite> | ||
</testsuites> | ||
<filter> | ||
<whitelist> | ||
<directory>./src</directory> | ||
</whitelist> | ||
</filter> | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?php | ||
|
||
namespace Sandwich\ViesBundle\Tests\Validator\Constraint; | ||
|
||
use Sandwich\ViesBundle\Validator\Constraint\VatNumber; | ||
use Sandwich\ViesBundle\Validator\Constraint\VatNumberValidator; | ||
|
||
final class VatNumberTest extends \PHPUnit_Framework_TestCase | ||
{ | ||
/** | ||
* @var VatNumber | ||
*/ | ||
private $constraint; | ||
|
||
protected function setUp() | ||
{ | ||
$this->constraint = new VatNumber(); | ||
} | ||
|
||
public function testContainsCorrectInitialFormat() | ||
{ | ||
self::assertSame('NL', $this->constraint->format); | ||
} | ||
|
||
public function testContainsCorrectMessage() | ||
{ | ||
self::assertSame('This is not a valid %format% vat number.', $this->constraint->message); | ||
} | ||
|
||
public function testValidatedByHasCorrectValidator() | ||
{ | ||
self::assertSame(VatNumberValidator::class, $this->constraint->validatedBy()); | ||
} | ||
} |
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