Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions tests/Integration/VerifyEmailBundleAutowireTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

/*
* This file is part of the SymfonyCasts VerifyEmailBundle package.
* Copyright (c) SymfonyCasts <https://symfonycasts.com/>
Expand Down
3 changes: 2 additions & 1 deletion tests/Integration/VerifyEmailServiceDefinitionTest.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
<?php

declare(strict_types=1);

/*
* This file is part of the SymfonyCasts VerifyEmailBundle package.
* Copyright (c) SymfonyCasts <https://symfonycasts.com/>
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace SymfonyCasts\Bundle\VerifyEmail\Tests\Integration;

use PHPUnit\Framework\TestCase;
Expand Down
13 changes: 8 additions & 5 deletions tests/VerifyEmailTestKernel.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
<?php

declare(strict_types=1);

/*
* This file is part of the SymfonyCasts VerifyEmailBundle package.
* Copyright (c) SymfonyCasts <https://symfonycasts.com/>
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace SymfonyCasts\Bundle\VerifyEmail\Tests;

use Symfony\Bundle\FrameworkBundle\FrameworkBundle;
Expand All @@ -32,8 +33,8 @@ class VerifyEmailTestKernel extends Kernel
*/
public function __construct(
private ?ContainerBuilder $builder = null,
private array $routes = [],
private array $extraBundles = [],
private readonly array $routes = [],
private readonly array $extraBundles = [],
) {
parent::__construct('test', true);
}
Expand All @@ -51,13 +52,13 @@ public function registerBundles(): iterable

public function registerContainerConfiguration(LoaderInterface $loader): void
{
if (null === $this->builder) {
if (!$this->builder instanceof ContainerBuilder) {
$this->builder = new ContainerBuilder();
}

$builder = $this->builder;

$loader->load(function (ContainerBuilder $container) use ($builder) {
$loader->load(function (ContainerBuilder $container) use ($builder): void {
$container->merge($builder);
$container->loadFromExtension(
'framework',
Expand Down Expand Up @@ -92,11 +93,13 @@ public function loadRoutes(LoaderInterface $loader): RouteCollection
return $routes;
}

#[\Override]
public function getCacheDir(): string
{
return sys_get_temp_dir().'/cache'.spl_object_hash($this);
}

#[\Override]
public function getLogDir(): string
{
return sys_get_temp_dir().'/logs'.spl_object_hash($this);
Expand Down