File tree Expand file tree Collapse file tree 3 files changed +11
-6
lines changed
tests/ComponentRepository Expand file tree Collapse file tree 3 files changed +11
-6
lines changed Original file line number Diff line number Diff line change 4343 "symfony/finder" : " 6.4|^7.0" ,
4444 "tales-from-a-dev/twig-tailwind-extra" : " ^0.3.0" ,
4545 "zenstruck/console-test" : " ^1.7" ,
46- "symfony/http-client" : " 6.4|^7.0"
46+ "symfony/http-client" : " 6.4|^7.0" ,
47+ "symfony/stopwatch" : " ^7.2"
4748 },
4849 "autoload" : {
4950 "psr-4" : {
Original file line number Diff line number Diff line change 1111 <ini name =" error_reporting" value =" -1" />
1212 <server name =" SYMFONY_DEPRECATIONS_HELPER" value =" max[self]=0& max[direct]=0" />
1313 <server name =" KERNEL_CLASS" value =" Symfony\UX\Toolkit\Tests\Fixtures\Kernel" />
14+ <ini name =" error_reporting" value =" -1" />
15+ <server name =" SYMFONY_DEPRECATIONS_HELPER" value =" max[self]=0& max[direct]=0" />
1416 </php >
1517 <testsuites >
1618 <testsuite name =" UX Toolkit Test Suite" >
1719 <directory >tests</directory >
1820 </testsuite >
1921 </testsuites >
22+ <listeners >
23+ <listener class =" Symfony\Bridge\PhpUnit\SymfonyTestsListener" />
24+ </listeners >
2025</phpunit >
Original file line number Diff line number Diff line change 1212namespace Symfony \UX \Toolkit \Tests \ComponentRepository ;
1313
1414use PHPUnit \Framework \TestCase ;
15+ use Symfony \Bundle \FrameworkBundle \Test \KernelTestCase ;
1516use Symfony \UX \Toolkit \ComponentRepository \GithubRepository ;
1617use Symfony \UX \Toolkit \ComponentRepository \OfficialRepository ;
1718use Symfony \UX \Toolkit \ComponentRepository \RepositoryFactory ;
2122/**
2223 * @author Jean-François Lépine
2324 */
24- class RepositoryFactoryTest extends TestCase
25+ class RepositoryFactoryTest extends KernelTestCase
2526{
2627 /**
2728 * @dataProvider providesSources
@@ -31,10 +32,8 @@ public function testItShouldFactoryRepositoryAccordingToItsName(
3132 ?string $ expectedInstance ,
3233 bool $ shouldThrowException = false ,
3334 ): void {
34- $ factory = new RepositoryFactory (
35- $ this ->createMock (OfficialRepository::class),
36- $ this ->createMock (GithubRepository::class)
37- );
35+ $ this ->bootKernel ();
36+ $ factory = static ::getContainer ()->get (RepositoryFactory::class);
3837
3938 if ($ shouldThrowException ) {
4039 $ this ->expectException (\InvalidArgumentException::class);
You can’t perform that action at this time.
0 commit comments