8000 [FrameworkBundle] Small changes to test setup. · hhamon/symfony@ff0412a · GitHub
[go: up one dir, main page]

Skip to content

Commit ff0412a

Browse files
author
Drak
committed
[FrameworkBundle] Small changes to test setup.
1 parent af9ddc0 commit ff0412a

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

src/Symfony/Bundle/FrameworkBundle/Tests/Functional/WebTestCase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class WebTestCase extends BaseWebTestCase
1818
{
1919
static public function assertRedirect($response, $location)
2020
{
21-
self::assertTrue($response->isRedirect(), 'Response is not a redirect, got status code: '.substr($response, 0, 2000));
21+
self::assertTrue($response->isRedirect(), 'Response is not a redirect, got status code: '.$response->getStatusCode());
2222
self::assertEquals('http://localhost'.$location, $response->headers->get('Location'));
2323
}
2424

src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/AppKernel.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@
1717
while ($dir !== $lastDir) {
1818
$lastDir = $dir;
1919

20-
if (is_file($dir.'/autoload.php')) {
20+
if (file_exists($dir.'/autoload.php')) {
2121
require_once $dir.'/autoload.php';
2222
break;
2323
}
2424

25-
if (is_file($dir.'/autoload.php.dist')) {
25+
if (file_exists($dir.'/autoload.php.dist')) {
2626
require_once $dir.'/autoload.php.dist';
2727
break;
2828
}
@@ -52,7 +52,7 @@ public function __construct($testCase, $rootConfig, $environment, $debug)
5252
$this->testCase = $testCase;
5353

5454
$fs = new Filesystem();
D85C
55-
if (!$fs->isAbsolutePath($rootConfig) && !is_file($rootConfig = __DIR__.'/'.$testCase.'/'.$rootConfig)) {
55+
if (!$fs->isAbsolutePath($rootConfig) && !file_exists($rootConfig = __DIR__.'/'.$testCase.'/'.$rootConfig)) {
5656
throw new \InvalidArgumentException(sprintf('The root config "%s" does not exist.', $rootConfig));
5757
}
5858
$this->rootConfig = $rootConfig;
@@ -62,7 +62,7 @@ public function __construct($testCase, $rootConfig, $environment, $debug)
6262

6363
public function registerBundles()
6464
{
65-
if (!is_file($filename = $this->getRootDir().'/'.$this->testCase.'/bundles.php')) {
65+
if (!file_exists($filename = $this->getRootDir().'/'.$this->testCase.'/bundles.php')) {
6666
throw new \RuntimeException(sprintf('The bundles file "%s" does not exist.', $filename));
6767
}
6868

src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/config/framework.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ framework:
88
form: ~
99
test: ~
1010
session:
11+
default_locale: en
1112
auto_start: true
1213
storage_id: session.storage.filesystem
14+
1315
services:
1416
logger: { class: Symfony\Component\HttpKernel\Log\NullLogger }

0 commit comments

Comments
 (0)
0