Skip to content

Commit 2d9d10b

Browse files
committed
fix autoloader tests without composer
The autoloader tests without composer need to take ini value into consideration.
1 parent 6123bb4 commit 2d9d10b

File tree

2 files changed

+26
-1
lines changed

2 files changed

+26
-1
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?php
2+
/*
3+
* Copyright 2020 New Relic Corporation. All rights reserved.
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
/*DESCRIPTION
8+
Test detection of autoloader when Composer is not used and use of composer for
9+
package detection is disabled (default). Supportability metrics for
10+
Autoloader and Composer libraries must not be present.
11+
*/
12+
13+
/*INI
14+
*/
15+
16+
/*EXPECT_METRICS_DONT_EXIST
17+
Supportability/library/Autoloader/detected
18+
Supportability/library/Composer/detected
19+
*/
20+
21+
/*EXPECT_TRACED_ERRORS null*/
22+
23+
require 'autoload-without-composer/vendor/autoload.php';

tests/integration/autoloader/test_autoloader_without_composer.php renamed to tests/integration/autoloader/test_autoloader_without_composer_enabled.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,13 @@
55
*/
66

77
/*DESCRIPTION
8-
Test detection of autoloader when Composer is not used. Supportability metrics for
8+
Test detection of autoloader when Composer is not used and use of composer for
9+
package detection is enabled. Supportability metrics for
910
Autoloader library should be present but Composer should not.
1011
*/
1112

1213
/*INI
14+
newrelic.vulnerability_management.composer_detection.enabled=true
1315
*/
1416

1517
/*EXPECT_METRICS_EXIST

0 commit comments

Comments
 (0)