Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita146e4d

Browse files
committed
feature#22276 [FrameworkBundle] Returns the kernel instance in KernelTestCase::bootKernel (lyrixx)
This PR was merged into the 3.3-dev branch.Discussion----------[FrameworkBundle] Returns the kernel instance in KernelTestCase::bootKernel| Q | A| ------------- | ---| Branch? | master| Bug fix? | no| New feature? | yes| BC breaks? | no| Deprecations? | no| Tests pass? | yes| Fixed tickets | -| License | MIT| Doc PR | -Commits-------da333a0 [FrameworkBundle] Returns the kernel instance in KernelTestCase::bootKernel
2 parentse47a50b +da333a0 commita146e4d

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

‎src/Symfony/Bundle/FrameworkBundle/Test/KernelTestCase.php‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,13 +138,17 @@ protected static function getKernelClass()
138138
* Boots the Kernel for this test.
139139
*
140140
* @param array $options
141+
*
142+
* @return KernelInterface A KernelInterface instance
141143
*/
142144
protectedstaticfunctionbootKernel(array$options =array())
143145
{
144146
static::ensureKernelShutdown();
145147

146148
static::$kernel =static::createKernel($options);
147149
static::$kernel->boot();
150+
151+
returnstatic::$kernel;
148152
}
149153

150154
/**

‎src/Symfony/Bundle/FrameworkBundle/Test/WebTestCase.php‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ abstract class WebTestCase extends KernelTestCase
3030
*/
3131
protectedstaticfunctioncreateClient(array$options =array(),array$server =array())
3232
{
33-
static::bootKernel($options);
33+
$kernel =static::bootKernel($options);
3434

35-
$client =static::$kernel->getContainer()->get('test.client');
35+
$client =$kernel->getContainer()->get('test.client');
3636
$client->setServerParameters($server);
3737

3838
return$client;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp