File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed
src/Symfony/Cmf/Component/Testing/Functional Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change 1
1
<?php
2
2
3
3
$ req = $ _SERVER ['REQUEST_URI ' ];
4
+ $ asset = preg_replace ('/\?.*/ ' , '' , __DIR__ .$ req );
4
5
5
6
// If this looks like a file request then return
6
7
// false and serve the file
7
- if (preg_match ( ' ^\.[A-Za-z]{3,4}$^ ' , $ req )) {
8
+ if ($ asset != __DIR__ . ' / ' && file_exists ( $ asset )) {
8
9
return false ;
9
10
}
10
11
Original file line number Diff line number Diff line change @@ -8,12 +8,16 @@ abstract class BaseTestCase extends WebTestCase
8
8
{
9
9
protected $ db ;
10
10
protected $ dbManagers = array ();
11
+ protected $ container ;
11
12
12
13
public function getContainer ()
13
14
{
14
- $ client = $ this ->createClient ();
15
+ if (null === $ this ->container ) {
16
+ $ client = $ this ->createClient ();
17
+ $ this ->container = $ client ->getContainer ();
18
+ }
15
19
16
- return $ client -> getContainer () ;
20
+ return $ this -> container ;
17
21
}
18
22
19
23
public function db ($ type )
You can’t perform that action at this time.
0 commit comments