File tree 4 files changed +20
-4
lines changed
test/Sentry/SentryBundle/Test/DependencyInjection
4 files changed +20
-4
lines changed Original file line number Diff line number Diff line change 13
13
],
14
14
"require" : {
15
15
"php" : " >=5.3.3" ,
16
- "sentry/sentry" : " >=1.2 .0" ,
16
+ "sentry/sentry" : " >=1.5 .0" ,
17
17
"symfony/symfony" : " >=2.4.0"
18
18
},
19
19
"require-dev" : {
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ public function getConfigTreeBuilder()
23
23
$ rootNode
24
24
->children ()
25
25
->scalarNode ('app_path ' )
26
- ->defaultValue ('%kernel.root_dir% ' )
26
+ ->defaultValue ('%kernel.root_dir%/.. ' )
27
27
->end ()
28
28
->scalarNode ('client ' )
29
29
->defaultValue ('Sentry\SentryBundle\SentrySymfonyClient ' )
@@ -50,6 +50,11 @@ public function getConfigTreeBuilder()
50
50
->treatNullLike (array ())
51
51
->defaultValue (array ('%kernel.root_dir%/.. ' ))
52
52
->end ()
53
+ ->arrayNode ('excluded_app_paths ' )
54
+ ->prototype ('scalar ' )->end ()
55
+ ->treatNullLike (array ())
56
+ ->defaultValue (array ('%kernel.root_dir%/../vendor ' ))
57
+ ->end ()
53
58
->end ()
54
59
;
55
60
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ services:
6
6
- [setRelease, ['%sentry.release%']]
7
7
- [setEnvironment, ['%sentry.environment%']]
8
8
- [setAppPath, ['%sentry.app_path%']]
9
+ - [setExcludedAppPaths, ['%sentry.excluded_app_paths%']]
9
10
- [setPrefixes, ['%sentry.prefixes%']]
10
11
- [install, []]
11
12
Original file line number Diff line number Diff line change @@ -9,12 +9,12 @@ class ExtensionTest extends \PHPUnit_Framework_TestCase
9
9
{
10
10
const CONFIG_ROOT = 'sentry ' ;
11
11
12
- public function test_that_it_uses_kernel_root_as_app_path_by_default ()
12
+ public function test_that_it_uses_kernel_root_parent_as_app_path_by_default ()
13
13
{
14
14
$ container = $ this ->getContainer ();
15
15
16
16
$ this ->assertSame (
17
- 'kernel/root ' ,
17
+ 'kernel/root/.. ' ,
18
18
$ container ->getParameter ('sentry.app_path ' )
19
19
);
20
20
}
@@ -33,6 +33,16 @@ public function test_that_it_uses_app_path_value()
33
33
);
34
34
}
35
35
36
+ public function test_vendor_in_default_excluded_paths ()
37
+ {
38
+ $ container = $ this ->getContainer ();
39
+
40
+ $ this ->assertContains (
41
+ 'kernel/root/../vendor ' ,
42
+ $ container ->getParameter ('sentry.excluded_app_paths ' )
43
+ );
44
+ }
45
+
36
46
public function test_that_it_uses_defined_class_as_client_class_by_default ()
37
47
{
38
48
$ container = $ this ->getContainer ();
You can’t perform that action at this time.
0 commit comments