Skip to content

Commit

Permalink
trying to fix depreciations
Browse files Browse the repository at this point in the history
  • Loading branch information
Halleck45 committed Feb 2, 2025
1 parent d404ff5 commit 68f86ce
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
3 changes: 2 additions & 1 deletion src/Toolkit/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@
"symfony/finder": "6.4|^7.0",
"tales-from-a-dev/twig-tailwind-extra": "^0.3.0",
"zenstruck/console-test": "^1.7",
"symfony/http-client": "6.4|^7.0"
"symfony/http-client": "6.4|^7.0",
"symfony/stopwatch": "^7.2"
},
"autoload": {
"psr-4": {
Expand Down
5 changes: 5 additions & 0 deletions src/Toolkit/phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,15 @@
<ini name="error_reporting" value="-1"/>
<server name="SYMFONY_DEPRECATIONS_HELPER" value="max[self]=0&amp;max[direct]=0"/>
<server name="KERNEL_CLASS" value="Symfony\UX\Toolkit\Tests\Fixtures\Kernel"/>
<ini name="error_reporting" value="-1" />
<server name="SYMFONY_DEPRECATIONS_HELPER" value="max[self]=0&amp;max[direct]=0"/>
</php>
<testsuites>
<testsuite name="UX Toolkit Test Suite">
<directory>tests</directory>
</testsuite>
</testsuites>
<listeners>
<listener class="Symfony\Bridge\PhpUnit\SymfonyTestsListener"/>
</listeners>
</phpunit>
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
namespace Symfony\UX\Toolkit\Tests\ComponentRepository;

use PHPUnit\Framework\TestCase;
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
use Symfony\UX\Toolkit\ComponentRepository\GithubRepository;
use Symfony\UX\Toolkit\ComponentRepository\OfficialRepository;
use Symfony\UX\Toolkit\ComponentRepository\RepositoryFactory;
Expand All @@ -21,7 +22,7 @@
/**
* @author Jean-François Lépine
*/
class RepositoryFactoryTest extends TestCase
class RepositoryFactoryTest extends KernelTestCase
{
/**
* @dataProvider providesSources
Expand All @@ -31,10 +32,8 @@ public function testItShouldFactoryRepositoryAccordingToItsName(
?string $expectedInstance,
bool $shouldThrowException = false,
): void {
$factory = new RepositoryFactory(
$this->createMock(OfficialRepository::class),
$this->createMock(GithubRepository::class)
);
$this->bootKernel();
$factory = static::getContainer()->get(RepositoryFactory::class);

if ($shouldThrowException) {
$this->expectException(\InvalidArgumentException::class);
Expand Down

0 comments on commit 68f86ce

Please sign in to comment.