Skip to content

Commit 36aaf3a

Browse files
committed
add basic autoloader detection tests
1 parent 1f92ebe commit 36aaf3a

File tree

5 files changed

+44
-0
lines changed

5 files changed

+44
-0
lines changed

tests/integration/autoloader/autoload-with-composer/vendor/autoload.php

Whitespace-only changes.

tests/integration/autoloader/autoload-with-composer/vendor/composer/autoload_real.php

Whitespace-only changes.

tests/integration/autoloader/autoload-without-composer/vendor/autoload.php

Whitespace-only changes.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
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 used. Supportability metrics for
9+
Autoloader and Composer libraries should be present.
10+
*/
11+
12+
/*INI
13+
*/
14+
15+
/*EXPECT_METRICS_EXIST
16+
Supportability/library/Autoloader/detected, 1
17+
Supportability/library/Composer/detected, 1
18+
*/
19+
20+
21+
require 'autoload-with-composer/vendor/autoload.php';
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. Supportability metrics for
9+
Autoloader library should be present but Composer should not.
10+
*/
11+
12+
/*INI
13+
*/
14+
15+
/*EXPECT_METRICS_EXIST
16+
Supportability/library/Autoloader/detected, 1
17+
*/
18+
19+
/*EXPECT_METRICS_DONT_EXIST
20+
Supportability/library/Composer/detected
21+
*/
22+
23+
require 'autoload-without-composer/vendor/autoload.php';

0 commit comments

Comments
 (0)