Skip to content

Commit d9f149b

Browse files
committed
Fixed asset handling
1 parent 9201b9b commit d9f149b

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

resources/web/router.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
<?php
22

33
$req = $_SERVER['REQUEST_URI'];
4+
$asset = preg_replace('/\?.*/', '', __DIR__.$req);
45

56
// If this looks like a file request then return
67
// false and serve the file
7-
if (preg_match('^\.[A-Za-z]{3,4}$^', $req)) {
8+
if ($asset != __DIR__.'/' && file_exists($asset)) {
89
return false;
910
}
1011

src/Symfony/Cmf/Component/Testing/Functional/BaseTestCase.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,16 @@ abstract class BaseTestCase extends WebTestCase
88
{
99
protected $db;
1010
protected $dbManagers = array();
11+
protected $container;
1112

1213
public function getContainer()
1314
{
14-
$client = $this->createClient();
15+
if (null === $this->container) {
16+
$client = $this->createClient();
17+
$this->container = $client->getContainer();
18+
}
1519

16-
return $client->getContainer();
20+
return $this->container;
1721
}
1822

1923
public function db($type)

0 commit comments

Comments
 (0)