-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
90 additions
and
0 deletions.
There are no files selected for viewing
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,22 @@ | ||
<?php | ||
/* | ||
* Copyright 2020 New Relic Corporation. All rights reserved. | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
/*DESCRIPTION | ||
The agent should name Yii2 cli transactions | ||
*/ | ||
|
||
/*EXPECT_METRICS_EXIST | ||
Supportability/framework/Yii2/detected | ||
OtherTransaction/Action/test-integration-cli-action | ||
*/ | ||
|
||
/*EXPECT_ERROR_EVENTS null */ | ||
|
||
/* WordPress mock app */ | ||
require_once __DIR__.'/yii2/baseyii.php'; | ||
|
||
$a = new yii\base\InlineAction('test-integration-cli-action'); | ||
$a->runWithParams([]); |
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,22 @@ | ||
<?php | ||
/* | ||
* Copyright 2020 New Relic Corporation. All rights reserved. | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
/*DESCRIPTION | ||
The agent should name Yii2 web transactions | ||
*/ | ||
|
||
/*EXPECT_METRICS_EXIST | ||
Supportability/framework/Yii2/detected | ||
OtherTransaction/Action/test-integration-web-action | ||
*/ | ||
|
||
/*EXPECT_ERROR_EVENTS null */ | ||
|
||
/* WordPress mock app */ | ||
require_once __DIR__.'/yii2/baseyii.php'; | ||
|
||
$a = new yii\base\Action('test-integration-web-action'); | ||
$a->runWithParams([]); |
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,46 @@ | ||
<?php | ||
|
||
/* | ||
* Copyright 2020 New Relic Corporation. All rights reserved. | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
/* Mock enough bits of Yii2 infrastructure for naming tests. */ | ||
|
||
namespace yii\base { | ||
|
||
/* Web action */ | ||
class Action { | ||
private $uniqid; | ||
|
||
public function __construct($argument) { | ||
$this->uniqid = $argument; | ||
} | ||
|
||
public function getUniqueId ( ) { | ||
return $this->uniqid; | ||
} | ||
|
||
public function runWithParams($params) { | ||
return; | ||
} | ||
} | ||
|
||
/* Console action */ | ||
class InlineAction { | ||
private $uniqid; | ||
|
||
public function __construct($id) { | ||
$this->uniqid = $id; | ||
} | ||
|
||
public function getUniqueId ( ) { | ||
return $this->uniqid; | ||
} | ||
|
||
public function runWithParams($params) { | ||
return; | ||
} | ||
} | ||
echo ""; | ||
} |