Skip to content

Commit

Permalink
add basic autoloader detection tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lavarou committed Sep 6, 2024
1 parent 1f92ebe commit 36aaf3a
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 0 deletions.
Empty file.
Empty file.
Empty file.
21 changes: 21 additions & 0 deletions tests/integration/autoloader/test_autoloader_with_composer.php
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 tests/integration/autoloader/test_autoloader_without_composer.php
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';

0 comments on commit 36aaf3a

Please sign in to comment.