Skip to content

Commit 2e8c141

Browse files
committed
Added: Search to testCreateGoals
1 parent d206845 commit 2e8c141

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

tests/integration/Admin/ProvisioningTest.php

+9-1
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ public function testCreateGoals() {
5454
'404',
5555
'outbound-links',
5656
'file-downloads',
57+
'search',
5758
];
5859
$mock = $this->getMockBuilder( Client::class )->onlyMethods( [ 'create_goals' ] )->getMock();
5960
$goals_array = [
@@ -75,6 +76,12 @@ public function testCreateGoals() {
7576
'goal_type' => 'Goal.CustomEvent',
7677
]
7778
),
79+
new Goal(
80+
[
81+
'goal' => new GoalPageviewAllOfGoal( [ 'display_name' => 'Search', 'id' => 444, 'path' => null ] ),
82+
'goal_type' => 'Goal.Pageview',
83+
]
84+
),
7885
];
7986
$goals = new Client\Model\GoalListResponse();
8087

@@ -88,10 +95,11 @@ public function testCreateGoals() {
8895

8996
$goal_ids = get_option( 'plausible_analytics_enhanced_measurements_goal_ids' );
9097

91-
$this->assertCount( 3, $goal_ids );
98+
$this->assertCount( 4, $goal_ids );
9299
$this->assertArrayHasKey( 111, $goal_ids );
93100
$this->assertArrayHasKey( 222, $goal_ids );
94101
$this->assertArrayHasKey( 333, $goal_ids );
102+
$this->assertArrayHasKey( 444, $goal_ids );
95103

96104
delete_option( 'plausible_analytics_enhanced_measurements_goal_ids' );
97105
}

0 commit comments

Comments
 (0)