-
-
Notifications
You must be signed in to change notification settings - Fork 13
/
watchdog.feature
46 lines (41 loc) · 1.46 KB
/
watchdog.feature
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
@errorcleanup
Feature: Check that WatchdogTrait works
@trait:WatchdogTrait
Scenario: Assert that watchdog fails with an error
Given some behat configuration
And scenario steps:
"""
Given set watchdog error level "warning"
"""
When I run "behat --no-colors"
Then it should fail with an error:
"""
PHP errors were logged to watchdog during scenario "Stub scenario title" (line 3):
"""
@trait:WatchdogTrait
Scenario: Assert that watchdog does not fail when a custom message type is triggered
Given some behat configuration
And scenario steps:
"""
Given set watchdog error level "warning" of type "custom_type"
"""
When I run "behat --no-colors"
Then it should pass
@trait:WatchdogTrait
Scenario: Assert that watchdog fails when a custom message type is triggered
Given some behat configuration
And scenario steps tagged with "@api @watchdog:custom_type":
"""
Given set watchdog error level "warning" of type "custom_type"
"""
When I run "behat --no-colors"
Then it should fail with an error:
"""
PHP errors were logged to watchdog during scenario "Stub scenario title" (line 3):
"""
@api
Scenario: Assert that watchdog does not track errors with level below threshold
Given set watchdog error level "notice"
@api @error
Scenario: Assert that watchdog track errors with level above threshold
Given set watchdog error level "warning"