forked from newrelic/newrelic-php-agent
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add basic autoloader detection tests
- Loading branch information
Showing
5 changed files
with
44 additions
and
0 deletions.
There are no files selected for viewing
Empty file.
Empty file.
Empty file.
21 changes: 21 additions & 0 deletions
21
tests/integration/autoloader/test_autoloader_with_composer.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?php | ||
/* | ||
* Copyright 2020 New Relic Corporation. All rights reserved. | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
/*DESCRIPTION | ||
Test detection of autoloader when Composer is used. Supportability metrics for | ||
Autoloader and Composer libraries should be present. | ||
*/ | ||
|
||
/*INI | ||
*/ | ||
|
||
/*EXPECT_METRICS_EXIST | ||
Supportability/library/Autoloader/detected, 1 | ||
Supportability/library/Composer/detected, 1 | ||
*/ | ||
|
||
|
||
require 'autoload-with-composer/vendor/autoload.php'; |
23 changes: 23 additions & 0 deletions
23
tests/integration/autoloader/test_autoloader_without_composer.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?php | ||
/* | ||
* Copyright 2020 New Relic Corporation. All rights reserved. | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
/*DESCRIPTION | ||
Test detection of autoloader when Composer is not used. Supportability metrics for | ||
Autoloader library should be present but Composer should not. | ||
*/ | ||
|
||
/*INI | ||
*/ | ||
|
||
/*EXPECT_METRICS_EXIST | ||
Supportability/library/Autoloader/detected, 1 | ||
*/ | ||
|
||
/*EXPECT_METRICS_DONT_EXIST | ||
Supportability/library/Composer/detected | ||
*/ | ||
|
||
require 'autoload-without-composer/vendor/autoload.php'; |