File tree Expand file tree Collapse file tree 2 files changed +25
-1
lines changed
tests/integration/autoloader
autoload-with-composer/vendor/composer Expand file tree Collapse file tree 2 files changed +25
-1
lines changed Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ namespace Composer ;
4
+ class InstalledVersions
5
+ {
6
+ private static $ installed = [
7
+ 'vendor1/package1 ' => '1.1.3 ' ,
8
+ 'vendor2/package2 ' => '2.1.5 '
9
+ ];
10
+
11
+ public static function getVersion (string $ packageName )
12
+ {
13
+ return self ::$ installed [$ packageName ];
14
+ }
15
+
16
+ public static function getInstalledPackages ()
17
+ {
18
+ // Return the package names
19
+ return array_keys (self ::$ installed );
20
+ }
21
+ }
Original file line number Diff line number Diff line change 6
6
7
7
/*DESCRIPTION
8
8
Test detection of autoloader when Composer is used. Supportability metrics for
9
- Autoloader and Composer libraries should be present.
9
+ Autoloader and Composer libraries should be present. Additionally, package
10
+ supportability metrics should be present for each package detected.
10
11
*/
11
12
12
13
/*INI
15
16
/*EXPECT_METRICS_EXIST
16
17
Supportability/library/Autoloader/detected, 1
17
18
Supportability/library/Composer/detected, 1
19
+ Supportability/PHP/package/vendor1/package1/1/detected, 1
20
+ Supportability/PHP/package/vendor2/package2/2/detected, 1
18
21
*/
19
22
20
23
/*EXPECT_TRACED_ERRORS null*/
You can’t perform that action at this time.
0 commit comments