Skip to content

update phpunit #127

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jun 1, 2017
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^2.0.0",
"phpunit/phpunit": "^4.8.31"
"phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One more thing, how about making it more obvious which minor versions we are fine with?

-"phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0"
+"phpunit/phpunit": "^4.8.35 || ^5.7.0 || ^6.0.0"

This way it is very accurately documented.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

},
"autoload": {
"psr-4": {
Expand Down
8 changes: 6 additions & 2 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,19 @@

<phpunit
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/4.8/phpunit.xsd"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/5.7/phpunit.xsd"
Copy link
Contributor

@localheinz localheinz May 31, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about referencing the schema by a relative URL?

-xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/5.7/phpunit.xsd"
+xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"

This way it will always be accurate, regardless of which version of phpunit/phpunit is installed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't know this is possible.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

backupGlobals="false"
backupStaticAttributes="false"
beStrictAboutOutputDuringTests="true"
beStrictAboutTestsThatDoNotTestAnything="true"
beStrictAboutTodoAnnotatedTests="true"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
failOnWarning="true"
bootstrap="vendor/autoload.php">
<testsuites>
<testsuite name="PHP test reporter test suite">
Expand All @@ -19,7 +23,7 @@
</testsuites>

<filter>
<whitelist>
<whitelist addUncoveredFilesFromWhitelist="true" processUncoveredFilesFromWhitelist="true">
<directory>./src</directory>
<exclude>
<directory>./composer</directory>
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/ApplicationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
use CodeClimate\PhpTestReporter\Application;
use Symfony\Component\Console\Tester\ApplicationTester;

class ApplicationTest extends \PHPUnit_Framework_TestCase
class ApplicationTest extends \PHPUnit\Framework\TestCase
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

{
const PROJECT_DIR = "/tmp/php-test-reporter-example-project";

Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/System/Git/GitInfoTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use CodeClimate\PhpTestReporter\System\Git\GitInfo;

class GitInfoTest extends \PHPUnit_Framework_TestCase
class GitInfoTest extends \PHPUnit\Framework\TestCase
{
public function testIsFinal()
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/TestReporter/Entity/CiInfoTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use CodeClimate\PhpTestReporter\TestReporter\Entity\CiInfo;

final class CiInfoTest extends \PHPUnit_Framework_TestCase
final class CiInfoTest extends \PHPUnit\Framework\TestCase
{
public function testToArrayReturnsEmptyArrayIfUnableToDetermineEnvironment()
{
Expand Down