Skip to content

Run all tests #136

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 1 commit into from
Dec 21, 2021
Merged
Show file tree
Hide file tree
Changes from all 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
17 changes: 0 additions & 17 deletions tests/ReaderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,25 +89,8 @@ private function assertApiContent(\cebe\openapi\spec\OpenApi $openapi)
$this->assertEquals("1.0.0", $openapi->info->version);
}

/**
* @see https://github.com/symfony/symfony/issues/34805
*/
public function testSymfonyYamlBugHunt()
{
// skip test on symfony/yaml 5.0 due to bug https://github.com/symfony/symfony/issues/34805
$installed = json_decode(file_get_contents(__DIR__ . '/../vendor/composer/installed.json'), true);
// Check for composer 2.0 structure
if (array_key_exists('packages', $installed)) {
$installed = $installed['packages'];
}
foreach($installed as $pkg) {
if ($pkg['name'] === 'symfony/yaml' && version_compare($pkg['version'], 'v4.4', '>=')) {
$this->markTestSkipped(
'This test is incompatible with symfony/yaml 4.4 and 5.0, see symfony bug https://github.com/symfony/symfony/issues/34805'
);
}
}

$openApiFile = __DIR__ . '/../vendor/oai/openapi-specification/examples/v3.0/uspto.yaml';
$openapi = \cebe\openapi\Reader::readFromYamlFile($openApiFile);

Expand Down
16 changes: 0 additions & 16 deletions tests/spec/OpenApiTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -188,22 +188,6 @@ public function specProvider()
*/
public function testSpecs($openApiFile)
{
// skip test on symfony/yaml 5.0 due to bug https://github.com/symfony/symfony/issues/34805
if ($openApiFile === 'oai/openapi-specification/examples/v3.0/uspto.yaml') {
$installed = json_decode(file_get_contents(__DIR__ . '/../../vendor/composer/installed.json'), true);
// Check for composer 2.0 structure
if (array_key_exists('packages', $installed)) {
$installed = $installed['packages'];
}
foreach ($installed as $pkg) {
if ($pkg['name'] === 'symfony/yaml' && version_compare($pkg['version'], 'v4.4', '>=')) {
$this->markTestSkipped(
'This test is incompatible with symfony/yaml 4.4 and 5.0, see symfony bug https://github.com/symfony/symfony/issues/34805'
);
}
}
}

if (strtolower(substr($openApiFile, -5, 5)) === '.json') {
$json = json_decode(file_get_contents(__DIR__ . '/../../vendor/' . $openApiFile), true);
$openapi = new OpenApi($json);
Expand Down