Просмотр исходного кода

minor #5304 DX: rename TravisTest, as we no longer test only Travis there (keradus)

This PR was squashed before being merged into the 2.16 branch.

Discussion
----------

DX: rename TravisTest, as we no longer test only Travis there

Commits
-------

10da2df28 DX: rename TravisTest, as we no longer test only Travis there
Dariusz Ruminski 4 лет назад
Родитель
Сommit
4b1d9120e6
1 измененных файлов с 17 добавлено и 13 удалено
  1. 17 13
      tests/AutoReview/CiConfigurationTest.php

+ 17 - 13
tests/AutoReview/TravisTest.php → tests/AutoReview/CiConfigurationTest.php

@@ -27,7 +27,7 @@ use Symfony\Component\Yaml\Yaml;
  * @group auto-review
  * @group auto-review
  * @group covers-nothing
  * @group covers-nothing
  */
  */
-final class TravisTest extends TestCase
+final class CiConfigurationTest extends TestCase
 {
 {
     public function testTestJobsRunOnEachPhp()
     public function testTestJobsRunOnEachPhp()
     {
     {
@@ -123,17 +123,10 @@ final class TravisTest extends TestCase
 
 
     private function getAllPhpVersionsUsedByCiForTests()
     private function getAllPhpVersionsUsedByCiForTests()
     {
     {
-        $jobs = array_filter($this->getTravisJobs(), function ($job) {
-            return false !== strpos($job['stage'], 'Test');
-        });
-
-        $travisPhpVersions = array_map(function ($job) {
-            return (string) $job['php'];
-        }, $jobs);
-
-        $gitHubPhpVersions = $this->getGitHubPhpVersions();
-
-        return array_merge($travisPhpVersions, $gitHubPhpVersions);
+        return array_merge(
+            $this->getPhpVersionsUsedByTravis(),
+            $this->getPhpVersionsUsedByGitHub()
+        );
     }
     }
 
 
     private function convertPhpVerIdToNiceVer($verId)
     private function convertPhpVerIdToNiceVer($verId)
@@ -189,7 +182,7 @@ final class TravisTest extends TestCase
         return $yaml['jobs']['include'];
         return $yaml['jobs']['include'];
     }
     }
 
 
-    private function getGitHubPhpVersions()
+    private function getPhpVersionsUsedByGitHub()
     {
     {
         $yaml = Yaml::parse(file_get_contents(__DIR__.'/../../.github/workflows/ci.yaml'));
         $yaml = Yaml::parse(file_get_contents(__DIR__.'/../../.github/workflows/ci.yaml'));
 
 
@@ -201,4 +194,15 @@ final class TravisTest extends TestCase
 
 
         return $phpVersions;
         return $phpVersions;
     }
     }
+
+    private function getPhpVersionsUsedByTravis()
+    {
+        $jobs = array_filter($this->getTravisJobs(), function ($job) {
+            return false !== strpos($job['stage'], 'Test');
+        });
+
+        return array_map(function ($job) {
+            return (string) $job['php'];
+        }, $jobs);
+    }
 }
 }