1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154
|
From: =?utf-8?q?David_Pr=C3=A9vot?= <taffit@debian.org>
Date: Fri, 11 Dec 2020 11:49:36 -0400
Subject: Tag tests relying on remote network
---
tests/Composer/Test/Command/AuditCommandTest.php | 2 ++
tests/Composer/Test/Command/DiagnoseCommandTest.php | 3 +++
tests/Composer/Test/Command/RequireCommandTest.php | 2 ++
tests/Composer/Test/Command/ShowCommandTest.php | 2 ++
tests/Composer/Test/Command/StatusCommandTest.php | 2 ++
tests/Composer/Test/CompletionFunctionalTest.php | 2 ++
tests/Composer/Test/Util/RemoteFilesystemTest.php | 2 ++
7 files changed, 15 insertions(+)
diff --git a/tests/Composer/Test/Command/AuditCommandTest.php b/tests/Composer/Test/Command/AuditCommandTest.php
index 4563e0f..1c278ba 100644
--- a/tests/Composer/Test/Command/AuditCommandTest.php
+++ b/tests/Composer/Test/Command/AuditCommandTest.php
@@ -13,6 +13,7 @@
namespace Composer\Test\Command;
use Composer\Test\TestCase;
+use PHPUnit\Framework\Attributes\Group;
use UnexpectedValueException;
class AuditCommandTest extends TestCase
@@ -42,6 +43,7 @@ class AuditCommandTest extends TestCase
$appTester->run(['command' => 'audit', '--locked' => true]);
}
+ #[Group('remote')]
public function testAuditPackageWithNoSecurityVulnerabilities(): void
{
$this->initTempComposer();
diff --git a/tests/Composer/Test/Command/DiagnoseCommandTest.php b/tests/Composer/Test/Command/DiagnoseCommandTest.php
index ef241c9..ae2420f 100644
--- a/tests/Composer/Test/Command/DiagnoseCommandTest.php
+++ b/tests/Composer/Test/Command/DiagnoseCommandTest.php
@@ -14,9 +14,11 @@ namespace Composer\Test\Command;
use Composer\Test\TestCase;
use Composer\Util\Platform;
+use PHPUnit\Framework\Attributes\Group;
class DiagnoseCommandTest extends TestCase
{
+ #[Group('remote')]
public function testCmdFail(): void
{
$this->initTempComposer(['name' => 'foo/bar', 'description' => 'test pkg']);
@@ -39,6 +41,7 @@ Checking https connectivity to packagist: OK
Checking github.com rate limit: ', $output);
}
+ #[Group('remote')]
public function testCmdSuccess(): void
{
$this->initTempComposer(['name' => 'foo/bar', 'description' => 'test pkg', 'license' => 'MIT']);
diff --git a/tests/Composer/Test/Command/RequireCommandTest.php b/tests/Composer/Test/Command/RequireCommandTest.php
index d7cc957..0170061 100644
--- a/tests/Composer/Test/Command/RequireCommandTest.php
+++ b/tests/Composer/Test/Command/RequireCommandTest.php
@@ -15,9 +15,11 @@ namespace Composer\Test\Command;
use Composer\Json\JsonFile;
use Composer\Test\TestCase;
use InvalidArgumentException;
+use PHPUnit\Framework\Attributes\Group;
class RequireCommandTest extends TestCase
{
+ #[Group('remote')]
public function testRequireThrowsIfNoneMatches(): void
{
$this->expectException(InvalidArgumentException::class);
diff --git a/tests/Composer/Test/Command/ShowCommandTest.php b/tests/Composer/Test/Command/ShowCommandTest.php
index f807d18..4ce75a9 100644
--- a/tests/Composer/Test/Command/ShowCommandTest.php
+++ b/tests/Composer/Test/Command/ShowCommandTest.php
@@ -19,6 +19,7 @@ use Composer\Repository\PlatformRepository;
use Composer\Test\TestCase;
use DateTimeImmutable;
use InvalidArgumentException;
+use PHPUnit\Framework\Attributes\Group;
class ShowCommandTest extends TestCase
{
@@ -736,6 +737,7 @@ OUTPUT;
* @dataProvider provideNotExistingPackage
* @param array<string, mixed> $options
*/
+ #[Group('remote')]
public function testNotExistingPackage(string $package, array $options, string $expected): void
{
$dir = $this->initTempComposer([
diff --git a/tests/Composer/Test/Command/StatusCommandTest.php b/tests/Composer/Test/Command/StatusCommandTest.php
index 17d65c3..20ccf5e 100644
--- a/tests/Composer/Test/Command/StatusCommandTest.php
+++ b/tests/Composer/Test/Command/StatusCommandTest.php
@@ -14,6 +14,7 @@ namespace Composer\Test\Command;
use Composer\Test\TestCase;
use Generator;
+use PHPUnit\Framework\Attributes\Group;
class StatusCommandTest extends TestCase
{
@@ -39,6 +40,7 @@ class StatusCommandTest extends TestCase
* @param array<mixed> $commandFlags
* @param array<mixed> $packageData
*/
+ #[Group('remote')]
public function testLocallyModifiedPackages(
array $composerJson,
array $commandFlags,
diff --git a/tests/Composer/Test/CompletionFunctionalTest.php b/tests/Composer/Test/CompletionFunctionalTest.php
index 1a691af..a6dd619 100644
--- a/tests/Composer/Test/CompletionFunctionalTest.php
+++ b/tests/Composer/Test/CompletionFunctionalTest.php
@@ -13,6 +13,7 @@
namespace Composer\Test;
use Composer\Console\Application;
+use PHPUnit\Framework\Attributes\Group;
use Symfony\Component\Console\Tester\CommandCompletionTester;
/**
@@ -126,6 +127,7 @@ class CompletionFunctionalTest extends TestCase
* @param string $input The command that is typed
* @param string[]|null $expectedSuggestions Sample expected suggestions. Null if nothing is expected.
*/
+ #[Group('remote')]
public function testComplete(string $input, ?array $expectedSuggestions): void
{
$input = explode(' ', $input);
diff --git a/tests/Composer/Test/Util/RemoteFilesystemTest.php b/tests/Composer/Test/Util/RemoteFilesystemTest.php
index 4c4d8bd..f5f8dc9 100644
--- a/tests/Composer/Test/Util/RemoteFilesystemTest.php
+++ b/tests/Composer/Test/Util/RemoteFilesystemTest.php
@@ -18,6 +18,7 @@ use Composer\IO\IOInterface;
use Composer\Util\AuthHelper;
use Composer\Util\RemoteFilesystem;
use Composer\Test\TestCase;
+use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\MockObject\MockObject;
use ReflectionMethod;
use ReflectionProperty;
@@ -281,6 +282,7 @@ class RemoteFilesystemTest extends TestCase
* @param non-empty-string $url
* @requires PHP 7.4.17
*/
+ #[Group('remote')]
public function testBitBucketPublicDownload(string $url, string $contents): void
{
$io = $this
|