-
-
Notifications
You must be signed in to change notification settings - Fork 327
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
22 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -54,8 +54,6 @@ | |
use Symfony\UX\TwigComponent\ComponentFactory; | ||
use Symfony\UX\TwigComponent\ComponentRenderer; | ||
|
||
use function Symfony\Component\DependencyInjection\Loader\Configurator\tagged_iterator; | ||
|
||
/** | ||
* @author Kevin Bond <[email protected]> | ||
* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,14 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of the Symfony package. | ||
* | ||
* (c) Fabien Potencier <[email protected]> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Symfony\UX\LiveComponent\Tests\Unit\DependencyInjection; | ||
|
||
use PHPUnit\Framework\TestCase; | ||
|
@@ -16,20 +25,20 @@ public function testDefaultSecret() | |
|
||
$this->assertEquals('%kernel.secret%', $config['secret']); | ||
} | ||
|
||
public function testEmptySecretThrows() | ||
{ | ||
$this->expectException(InvalidConfigurationException::class); | ||
$this->expectExceptionMessage('The path "live_component.secret" cannot contain an empty value, but got null.'); | ||
|
||
$processor = new Processor(); | ||
$config = $processor->processConfiguration(new LiveComponentExtension(), [ | ||
'live_component' => [ | ||
'secret' => null, | ||
], | ||
]); | ||
} | ||
|
||
public function testCustomSecret() | ||
{ | ||
$processor = new Processor(); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,14 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of the Symfony package. | ||
* | ||
* (c) Fabien Potencier <[email protected]> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Symfony\UX\LiveComponent\Tests\Unit\DependencyInjection; | ||
|
||
use PHPUnit\Framework\TestCase; | ||
|
@@ -32,7 +41,7 @@ public function testCustomSecretIsUsedInDefinition(): void | |
$this->assertSame('custom_secret', $container->getDefinition('ux.live_component.component_hydrator')->getArgument(4)); | ||
$this->assertSame('custom_secret', $container->getDefinition('ux.live_component.fingerprint_calculator')->getArgument(0)); | ||
} | ||
|
||
private function createContainer(): ContainerBuilder | ||
{ | ||
$container = new ContainerBuilder(new ParameterBag([ | ||
|