Skip to content

Commit

Permalink
Codecov
Browse files Browse the repository at this point in the history
  • Loading branch information
bigfoot90 committed Nov 6, 2017
1 parent 714f249 commit 07420fb
Show file tree
Hide file tree
Showing 46 changed files with 25 additions and 148 deletions.
17 changes: 13 additions & 4 deletions .circleci/config.yml
Expand Up @@ -7,7 +7,7 @@ jobs:
build:
docker:
# specify the version you desire here
- image: circleci/php:7.1-browsers
- image: circleci/php:7.1-cli

# Specify service dependencies here if necessary
# CircleCI maintains a library of pre-built images
Expand All @@ -29,9 +29,18 @@ jobs:
- run: composer install -n --prefer-dist

- save_cache:
key: v1-dependencies-{{ checksum "composer.json" }}
paths:
- ./vendor
key: v1-dependencies-{{ checksum "composer.json" }}

# run tests!
- run: ./vendor/bin/phpunit
- run:
name: Enable xdebug
command: sudo docker-php-ext-enable xdebug

- run:
name: Run Unit tests
command: vendor/bin/phpunit --coverage-clover=coverage.xml

- run:
name: Codecov
command: bash <(curl -s https://codecov.io/bash)
3 changes: 0 additions & 3 deletions tests/Command/BuilderValidateContractTest.php
Expand Up @@ -30,9 +30,6 @@
use PHPUnit\Framework\TestCase;
use Symfony\Component\Console\Tester\CommandTester;

/**
* @coversNothing
*/
class BuilderValidateContractTest extends TestCase
{
/**
Expand Down
5 changes: 1 addition & 4 deletions tests/Command/BuilderWriteContractTest.php
Expand Up @@ -30,9 +30,6 @@
use PHPUnit\Framework\TestCase;
use Symfony\Component\Console\Tester\CommandTester;

/**
* @coversNothing
*/
class BuilderWriteContractTest extends TestCase
{
/**
Expand Down Expand Up @@ -83,7 +80,7 @@ public function test_it_runs_pact_builder_and_throws_exception_if_no_pact_is_ret
return;
}

self::assertFalse(true, 'This test should end in the catch');
self::fail('This test should end in the catch');
}

public function test_it_reads_directory_and_builds_writes_contracts()
Expand Down
3 changes: 0 additions & 3 deletions tests/Command/ValidateContractTest.php
Expand Up @@ -30,9 +30,6 @@
use PHPUnit\Framework\TestCase;
use Symfony\Component\Console\Tester\CommandTester;

/**
* @coversNothing
*/
class ValidateContractTest extends TestCase
{
/**
Expand Down
3 changes: 0 additions & 3 deletions tests/Factory/PactRequestFactoryTest.php
Expand Up @@ -25,9 +25,6 @@
use Zend\Diactoros\Request;
use Zend\Diactoros\Stream;

/**
* @coversNothing
*/
class PactRequestFactoryTest extends TestCase
{
public function test_it_returns_pact_request_minimal()
Expand Down
3 changes: 0 additions & 3 deletions tests/Factory/PactResponseFactoryTest.php
Expand Up @@ -25,9 +25,6 @@
use Zend\Diactoros\Response;
use Zend\Diactoros\Stream;

/**
* @coversNothing
*/
class PactResponseFactoryTest extends TestCase
{
public function test_it_returns_pact_response_minimal()
Expand Down
3 changes: 0 additions & 3 deletions tests/Factory/SerializerFactoryTest.php
Expand Up @@ -23,9 +23,6 @@
use PHPUnit\Framework\TestCase;
use Symfony\Component\Serializer\Serializer;

/**
* @coversNothing
*/
class SerializerFactoryTest extends TestCase
{
public function test_it_returns_serializer()
Expand Down
3 changes: 1 addition & 2 deletions tests/Guzzle/ServerMock5Test.php
Expand Up @@ -29,7 +29,6 @@

/**
* @group guzzle
* @coversNothing
*/
class ServerMock5Test extends TestCase
{
Expand Down Expand Up @@ -78,7 +77,7 @@ public function test_it_throws_mismatch_if_request_not_match()
return;
}

self::assertFalse(true, 'This test should end in the catch');
self::fail('This test should end in the catch');
}

/**
Expand Down
1 change: 0 additions & 1 deletion tests/Guzzle/ServerMock6Test.php
Expand Up @@ -29,7 +29,6 @@

/**
* @group guzzle
* @coversNothing
*/
class ServerMock6Test extends TestCase
{
Expand Down
3 changes: 0 additions & 3 deletions tests/Loader/FileLoaderTest.php
Expand Up @@ -27,9 +27,6 @@
use PHPUnit\Framework\TestCase;
use Symfony\Component\Serializer\Serializer;

/**
* @coversNothing
*/
class FileLoaderTest extends TestCase
{
/**
Expand Down
13 changes: 5 additions & 8 deletions tests/Matcher/BodyMatcherTest.php
Expand Up @@ -25,9 +25,6 @@
use Zend\Diactoros\Request;
use Zend\Diactoros\Stream;

/**
* @coversNothing
*/
class BodyMatcherTest extends TestCase
{
/** @var BodyMatcher */
Expand Down Expand Up @@ -130,7 +127,7 @@ public function test_it_throws_mismatch_if_key_is_missing_with_body_url_encoded(
return;
}

self::assertFalse(true, 'This test should end in the catch');
self::fail('This test should end in the catch');
}

/**
Expand Down Expand Up @@ -159,7 +156,7 @@ public function test_it_throws_mismatch_if_key_is_missing_with_body_json_encoded
return;
}

self::assertFalse(true, 'This test should end in the catch');
self::fail('This test should end in the catch');
}

/**
Expand All @@ -186,7 +183,7 @@ public function test_it_throws_mismatch_if_value_doesnt_match_with_body_plain_st
return;
}

self::assertFalse(true, 'This test should end in the catch');
self::fail('This test should end in the catch');
}

/**
Expand Down Expand Up @@ -215,7 +212,7 @@ public function test_it_throws_mismatch_if_value_doesnt_match_with_body_url_enco
return;
}

self::assertFalse(true, 'This test should end in the catch');
self::fail('This test should end in the catch');
}

/**
Expand Down Expand Up @@ -244,6 +241,6 @@ public function test_it_throws_mismatch_if_value_doesnt_match_with_body_json_enc
return;
}

self::assertFalse(true, 'This test should end in the catch');
self::fail('This test should end in the catch');
}
}
7 changes: 2 additions & 5 deletions tests/Matcher/HeadersMatcherTest.php
Expand Up @@ -24,9 +24,6 @@
use PHPUnit\Framework\TestCase;
use Zend\Diactoros\Request;

/**
* @coversNothing
*/
class HeadersMatcherTest extends TestCase
{
/** @var HeadersMatcher */
Expand Down Expand Up @@ -80,7 +77,7 @@ public function test_it_throws_mismatch_if_key_is_missing()
return;
}

self::assertFalse(true, 'This test should end in the catch');
self::fail('This test should end in the catch');
}

/**
Expand All @@ -104,6 +101,6 @@ public function test_it_throws_mismatch_if_value_doesnt_match()
return;
}

self::assertFalse(true, 'This test should end in the catch');
self::fail('This test should end in the catch');
}
}
3 changes: 0 additions & 3 deletions tests/Matcher/Mismatches/KeyNotFoundMismatchTest.php
Expand Up @@ -22,9 +22,6 @@

use PHPUnit\Framework\TestCase;

/**
* @coversNothing
*/
class KeyNotFoundMismatchTest extends TestCase
{
public function test_has_message_string()
Expand Down
3 changes: 0 additions & 3 deletions tests/Matcher/Mismatches/MismatchCollectionTest.php
Expand Up @@ -22,9 +22,6 @@

use PHPUnit\Framework\TestCase;

/**
* @coversNothing
*/
class MismatchCollectionTest extends TestCase
{
public function test_it_is_countable_and_iterable()
Expand Down
3 changes: 0 additions & 3 deletions tests/Matcher/Mismatches/TypeMismatchTest.php
Expand Up @@ -22,9 +22,6 @@

use PHPUnit\Framework\TestCase;

/**
* @coversNothing
*/
class TypeMismatchTest extends TestCase
{
public function test_has_message_string()
Expand Down
3 changes: 0 additions & 3 deletions tests/Matcher/Mismatches/ValueMismatchTest.php
Expand Up @@ -22,9 +22,6 @@

use PHPUnit\Framework\TestCase;

/**
* @coversNothing
*/
class ValueMismatchTest extends TestCase
{
public function test_has_message_string()
Expand Down
3 changes: 0 additions & 3 deletions tests/Matcher/Rules/AbstractRuleTest.php
Expand Up @@ -20,9 +20,6 @@

namespace Bigfoot\PHPacto\Matcher\Rules;

/**
* @coversNothing
*/
class AbstractRuleTest extends RuleAbstractTest
{
public function test_it_has_a_value_and_a_sample()
Expand Down
3 changes: 0 additions & 3 deletions tests/Matcher/Rules/AbstractStringRuleTest.php
Expand Up @@ -20,9 +20,6 @@

namespace Bigfoot\PHPacto\Matcher\Rules;

/**
* @coversNothing
*/
class AbstractStringRuleTest extends RuleAbstractTest
{
public function test_it_is_not_case_sensitive_by_default()
Expand Down
5 changes: 1 addition & 4 deletions tests/Matcher/Rules/AndRuleTest.php
Expand Up @@ -22,9 +22,6 @@

use Bigfoot\PHPacto\Matcher\Mismatches;

/**
* @coversNothing
*/
class AndRuleTest extends RuleAbstractTest
{
public function test_it_is_normalizable()
Expand Down Expand Up @@ -138,6 +135,6 @@ public function testMismatchCount()
throw $e;
}

self::assertFalse(true, 'This test should end in the catch');
self::fail('This test should end in the catch');
}
}
3 changes: 0 additions & 3 deletions tests/Matcher/Rules/ContainsRuleTest.php
Expand Up @@ -22,9 +22,6 @@

use Bigfoot\PHPacto\Matcher\Mismatches;

/**
* @coversNothing
*/
class ContainsRuleTest extends RuleAbstractTest
{
public function test_it_is_normalizable()
Expand Down
3 changes: 0 additions & 3 deletions tests/Matcher/Rules/CountRuleTest.php
Expand Up @@ -22,9 +22,6 @@

use Bigfoot\PHPacto\Matcher\Mismatches;

/**
* @coversNothing
*/
class CountRuleTest extends RuleAbstractTest
{
public function test_it_is_normalizable()
Expand Down
3 changes: 0 additions & 3 deletions tests/Matcher/Rules/DateTimeRuleTest.php
Expand Up @@ -22,9 +22,6 @@

use Bigfoot\PHPacto\Matcher\Mismatches;

/**
* @coversNothing
*/
class DateTimeRuleTest extends RuleAbstractTest
{
public function test_it_is_normalizable()
Expand Down
3 changes: 0 additions & 3 deletions tests/Matcher/Rules/EachRuleTest.php
Expand Up @@ -22,9 +22,6 @@

use Bigfoot\PHPacto\Matcher\Mismatches;

/**
* @coversNothing
*/
class EachRuleTest extends RuleAbstractTest
{
public function test_it_is_normalizable()
Expand Down
3 changes: 0 additions & 3 deletions tests/Matcher/Rules/EqualsRuleTest.php
Expand Up @@ -22,9 +22,6 @@

use Bigfoot\PHPacto\Matcher\Mismatches;

/**
* @coversNothing
*/
class EqualsRuleTest extends RuleAbstractTest
{
public function test_it_is_normalizable()
Expand Down
3 changes: 0 additions & 3 deletions tests/Matcher/Rules/GreaterOrEqualRuleTest.php
Expand Up @@ -22,9 +22,6 @@

use Bigfoot\PHPacto\Matcher\Mismatches;

/**
* @coversNothing
*/
class GreaterOrEqualRuleTest extends RuleAbstractTest
{
public function test_it_is_normalizable()
Expand Down
3 changes: 0 additions & 3 deletions tests/Matcher/Rules/GreaterRuleTest.php
Expand Up @@ -22,9 +22,6 @@

use Bigfoot\PHPacto\Matcher\Mismatches;

/**
* @coversNothing
*/
class GreaterRuleTest extends RuleAbstractTest
{
public function test_it_is_normalizable()
Expand Down
3 changes: 0 additions & 3 deletions tests/Matcher/Rules/LowerOrEqualRuleTest.php
Expand Up @@ -22,9 +22,6 @@

use Bigfoot\PHPacto\Matcher\Mismatches;

/**
* @coversNothing
*/
class LowerOrEqualRuleTest extends RuleAbstractTest
{
public function test_it_is_normalizable()
Expand Down
3 changes: 0 additions & 3 deletions tests/Matcher/Rules/LowerRuleTest.php
Expand Up @@ -22,9 +22,6 @@

use Bigfoot\PHPacto\Matcher\Mismatches;

/**
* @coversNothing
*/
class LowerRuleTest extends RuleAbstractTest
{
public function test_it_is_normalizable()
Expand Down
3 changes: 0 additions & 3 deletions tests/Matcher/Rules/NotEqualsRuleTest.php
Expand Up @@ -22,9 +22,6 @@

use Bigfoot\PHPacto\Matcher\Mismatches;

/**
* @coversNothing
*/
class NotEqualsRuleTest extends RuleAbstractTest
{
public function test_it_is_normalizable()
Expand Down

0 comments on commit 07420fb

Please sign in to comment.