Skip to content

Commit

Permalink
updating test descriptions
Browse files Browse the repository at this point in the history
use a fixture file based on a real package
  • Loading branch information
robaiken committed May 8, 2024
1 parent fc0b827 commit 667da5b
Show file tree
Hide file tree
Showing 3 changed files with 89 additions and 21 deletions.
12 changes: 6 additions & 6 deletions composer/spec/dependabot/composer/update_checker_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@
end
end

context "with an update that can't resolve" do
context "with an update that can't resolve due to a version conflict" do
let(:project_name) { "version_conflict_on_update" }
let(:dependency_name) { "longman/telegram-bot" }
let(:dependency_version) { "2.1.5" }
Expand All @@ -528,7 +528,7 @@

it { is_expected.to be_nil }

it "version conflict logs an error" do
it "logs an error" do
allow(Dependabot.logger).to receive(:error)
Dependabot.logger.error
expect(Dependabot.logger).to have_received(:error).once
Expand All @@ -547,12 +547,12 @@
end
end

context "missing native extension logs an error" do
let(:dependency_name) { "robaiken/missing-ext" }
let(:dependency_version) { "1.0.0" }
context "missing native extension" do
let(:dependency_name) { "phpunit/php-code-coverage" }
let(:dependency_version) { "11.0.0" }
let(:requirements) do
[{
requirement: "1.0.*",
requirement: "11.0.*",
file: "composer.json",
groups: ["runtime"],
source: { type: "path" }
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
{
"minified": "composer/2.0",
"packages": {
"phpunit/php-code-coverage": {
"name": "phpunit/php-code-coverage",
"version": "11.0.0",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-code-coverage.git",
"reference": "5e238e4b982cb272bf9faeee6f33af83d465d0e2"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/5e238e4b982cb272bf9faeee6f33af83d465d0e2",
"reference": "5e238e4b982cb272bf9faeee6f33af83d465d0e2",
"shasum": ""
},
"require": {
"ext-dom": "*",
"ext-libxml": "*",
"ext-xmlwriter": "*",
"nikic/php-parser": "^5.0",
"php": ">=8.2",
"phpunit/php-file-iterator": "^5.0",
"phpunit/php-text-template": "^4.0",
"sebastian/code-unit-reverse-lookup": "^4.0",
"sebastian/complexity": "^4.0",
"sebastian/environment": "^7.0",
"sebastian/lines-of-code": "^3.0",
"sebastian/version": "^5.0",
"theseer/tokenizer": "^1.2.0"
},
"require-dev": {
"phpunit/phpunit": "^11.0"
},
"suggest": {
"ext-pcov": "PHP extension that provides line coverage",
"ext-xdebug": "PHP extension that provides line coverage as well as branch and path coverage"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "11.0-dev"
}
},
"autoload": {
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de",
"role": "lead"
}
],
"description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.",
"homepage": "https://github.com/sebastianbergmann/php-code-coverage",
"keywords": [
"coverage",
"testing",
"xunit"
],
"support": {
"issues": "https://github.com/sebastianbergmann/php-code-coverage/issues",
"security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy",
"source": "https://github.com/sebastianbergmann/php-code-coverage/tree/11.0.0"
},
"funding": [
{
"url": "https://github.com/sebastianbergmann",
"type": "github"
}
],
"time": "2024-02-02T06:03:46+00:00"
}
}
}

This file was deleted.

0 comments on commit 667da5b

Please sign in to comment.