Skip to content

Renaming Fixture/ -> Fixtures/ #262

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 2, 2022
Merged
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: 1 addition & 1 deletion src/LiveComponent/phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
>
<php>
<ini name="error_reporting" value="-1" />
<server name="KERNEL_CLASS" value="Symfony\UX\LiveComponent\Tests\Fixture\Kernel" />
<server name="KERNEL_CLASS" value="Symfony\UX\LiveComponent\Tests\Fixtures\Kernel" />
<server name="DATABASE_URL" value="sqlite:///%kernel.project_dir%/var/data.db" />
<env name="SHELL_VERBOSITY" value="-1"/>
<server name="SYMFONY_DEPRECATIONS_HELPER" value="max[self]=0&amp;max[direct]=0"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
* file that was distributed with this source code.
*/

namespace Symfony\UX\LiveComponent\Tests\Fixture\Component;
namespace Symfony\UX\LiveComponent\Tests\Fixtures\Component;

use Symfony\UX\LiveComponent\Attribute\AsLiveComponent;
use Symfony\UX\LiveComponent\Attribute\LiveAction;
use Symfony\UX\LiveComponent\Attribute\LiveProp;
use Symfony\UX\LiveComponent\DefaultActionTrait;
use Symfony\UX\LiveComponent\Tests\Fixture\Entity\Entity1;
use Symfony\UX\LiveComponent\Tests\Fixtures\Entity\Entity1;

/**
* @author Kevin Bond <[email protected]>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/

namespace Symfony\UX\LiveComponent\Tests\Fixture\Component;
namespace Symfony\UX\LiveComponent\Tests\Fixtures\Component;

use Symfony\Component\HttpFoundation\RedirectResponse;
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/

namespace Symfony\UX\LiveComponent\Tests\Fixture\Component;
namespace Symfony\UX\LiveComponent\Tests\Fixtures\Component;

use Symfony\UX\LiveComponent\Attribute\AsLiveComponent;
use Symfony\UX\LiveComponent\Attribute\LiveProp;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/

namespace Symfony\UX\LiveComponent\Tests\Fixture\Component;
namespace Symfony\UX\LiveComponent\Tests\Fixtures\Component;

use Symfony\UX\LiveComponent\Attribute\BeforeReRender;
use Symfony\UX\LiveComponent\Attribute\LiveAction;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/

namespace Symfony\UX\LiveComponent\Tests\Fixture\Component;
namespace Symfony\UX\LiveComponent\Tests\Fixtures\Component;

use Symfony\UX\LiveComponent\Attribute\AsLiveComponent;
use Symfony\UX\LiveComponent\DefaultActionTrait;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/

namespace Symfony\UX\LiveComponent\Tests\Fixture\Component;
namespace Symfony\UX\LiveComponent\Tests\Fixtures\Component;

use Symfony\UX\LiveComponent\Attribute\AsLiveComponent;
use Symfony\UX\LiveComponent\Attribute\LiveAction;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Symfony\UX\LiveComponent\Tests\Fixture\Component;
namespace Symfony\UX\LiveComponent\Tests\Fixtures\Component;

use Symfony\UX\LiveComponent\Attribute\AsLiveComponent;
use Symfony\UX\LiveComponent\DefaultActionTrait;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/

namespace Symfony\UX\LiveComponent\Tests\Fixture\Component;
namespace Symfony\UX\LiveComponent\Tests\Fixtures\Component;

use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\Form\FormInterface;
Expand All @@ -18,9 +18,9 @@
use Symfony\UX\LiveComponent\Attribute\LiveArg;
use Symfony\UX\LiveComponent\ComponentWithFormTrait;
use Symfony\UX\LiveComponent\DefaultActionTrait;
use Symfony\UX\LiveComponent\Tests\Fixture\Dto\BlogPost;
use Symfony\UX\LiveComponent\Tests\Fixture\Dto\Comment;
use Symfony\UX\LiveComponent\Tests\Fixture\Form\BlogPostFormType;
use Symfony\UX\LiveComponent\Tests\Fixtures\Dto\BlogPost;
use Symfony\UX\LiveComponent\Tests\Fixtures\Dto\Comment;
use Symfony\UX\LiveComponent\Tests\Fixtures\Form\BlogPostFormType;

#[AsLiveComponent('form_with_collection_type')]
class FormWithCollectionTypeComponent extends AbstractController
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/

namespace Symfony\UX\LiveComponent\Tests\Fixture\Dto;
namespace Symfony\UX\LiveComponent\Tests\Fixtures\Dto;

use Symfony\Component\Validator\Constraints\Length;
use Symfony\Component\Validator\Constraints\NotBlank;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/

namespace Symfony\UX\LiveComponent\Tests\Fixture\Dto;
namespace Symfony\UX\LiveComponent\Tests\Fixtures\Dto;

class Comment
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/

namespace Symfony\UX\LiveComponent\Tests\Fixture\Entity;
namespace Symfony\UX\LiveComponent\Tests\Fixtures\Entity;

use Doctrine\ORM\Mapping as ORM;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@

declare(strict_types=1);

namespace Symfony\UX\LiveComponent\Tests\Fixture\Form;
namespace Symfony\UX\LiveComponent\Tests\Fixtures\Form;

use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\CollectionType;
use Symfony\Component\Form\Extension\Core\Type\TextareaType;
use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
use Symfony\UX\LiveComponent\Tests\Fixture\Dto\BlogPost;
use Symfony\UX\LiveComponent\Tests\Fixtures\Dto\BlogPost;

class BlogPostFormType extends AbstractType
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@

declare(strict_types=1);

namespace Symfony\UX\LiveComponent\Tests\Fixture\Form;
namespace Symfony\UX\LiveComponent\Tests\Fixtures\Form;

use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\TextareaType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
use Symfony\UX\LiveComponent\Tests\Fixture\Dto\Comment;
use Symfony\UX\LiveComponent\Tests\Fixtures\Dto\Comment;

class CommentFormType extends AbstractType
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/

namespace Symfony\UX\LiveComponent\Tests\Fixture;
namespace Symfony\UX\LiveComponent\Tests\Fixtures;

use Doctrine\Bundle\DoctrineBundle\DoctrineBundle;
use Psr\Log\NullLogger;
Expand All @@ -22,12 +22,12 @@
use Symfony\Component\HttpKernel\Kernel as BaseKernel;
use Symfony\Component\Routing\Loader\Configurator\RoutingConfigurator;
use Symfony\UX\LiveComponent\LiveComponentBundle;
use Symfony\UX\LiveComponent\Tests\Fixture\Component\Component1;
use Symfony\UX\LiveComponent\Tests\Fixture\Component\Component2;
use Symfony\UX\LiveComponent\Tests\Fixture\Component\Component3;
use Symfony\UX\LiveComponent\Tests\Fixture\Component\Component6;
use Symfony\UX\LiveComponent\Tests\Fixture\Component\ComponentWithAttributes;
use Symfony\UX\LiveComponent\Tests\Fixture\Component\FormWithCollectionTypeComponent;
use Symfony\UX\LiveComponent\Tests\Fixtures\Component\Component1;
use Symfony\UX\LiveComponent\Tests\Fixtures\Component\Component2;
use Symfony\UX\LiveComponent\Tests\Fixtures\Component\Component3;
use Symfony\UX\LiveComponent\Tests\Fixtures\Component\Component6;
use Symfony\UX\LiveComponent\Tests\Fixtures\Component\ComponentWithAttributes;
use Symfony\UX\LiveComponent\Tests\Fixtures\Component\FormWithCollectionTypeComponent;
use Symfony\UX\TwigComponent\TwigComponentBundle;
use Twig\Environment;

Expand Down Expand Up @@ -80,7 +80,7 @@ protected function configureContainer(ContainerBuilder $c, LoaderInterface $load
]);

$c->loadFromExtension('twig', [
'default_path' => '%kernel.project_dir%/tests/Fixture/templates',
'default_path' => '%kernel.project_dir%/tests/Fixtures/templates',
]);

$c->loadFromExtension('doctrine', [
Expand All @@ -92,8 +92,8 @@ protected function configureContainer(ContainerBuilder $c, LoaderInterface $load
'Test' => [
'is_bundle' => false,
'type' => 'annotation',
'dir' => '%kernel.project_dir%/tests/Fixture/Entity',
'prefix' => 'Symfony\UX\LiveComponent\Tests\Fixture\Entity',
'dir' => '%kernel.project_dir%/tests/Fixtures/Entity',
'prefix' => 'Symfony\UX\LiveComponent\Tests\Fixtures\Entity',
'alias' => 'Test',
],
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;
use Symfony\UX\LiveComponent\LiveComponentHydrator;
use Symfony\UX\LiveComponent\Tests\Fixture\Component\Component1;
use Symfony\UX\LiveComponent\Tests\Fixture\Component\Component2;
use Symfony\UX\LiveComponent\Tests\Fixture\Component\Component6;
use Symfony\UX\LiveComponent\Tests\Fixture\Entity\Entity1;
use Symfony\UX\LiveComponent\Tests\Fixtures\Component\Component1;
use Symfony\UX\LiveComponent\Tests\Fixtures\Component\Component2;
use Symfony\UX\LiveComponent\Tests\Fixtures\Component\Component6;
use Symfony\UX\LiveComponent\Tests\Fixtures\Entity\Entity1;
use Symfony\UX\TwigComponent\ComponentFactory;
use Zenstruck\Browser\Response\HtmlResponse;
use Zenstruck\Browser\Test\HasBrowser;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
use Symfony\Component\DomCrawler\Crawler;
use Symfony\Component\Form\FormFactoryInterface;
use Symfony\UX\LiveComponent\LiveComponentHydrator;
use Symfony\UX\LiveComponent\Tests\Fixture\Component\FormWithCollectionTypeComponent;
use Symfony\UX\LiveComponent\Tests\Fixture\Form\BlogPostFormType;
use Symfony\UX\LiveComponent\Tests\Fixtures\Component\FormWithCollectionTypeComponent;
use Symfony\UX\LiveComponent\Tests\Fixtures\Form\BlogPostFormType;
use Symfony\UX\TwigComponent\ComponentFactory;
use Zenstruck\Browser\Response\HtmlResponse;
use Zenstruck\Browser\Test\HasBrowser;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
use Symfony\UX\LiveComponent\Attribute\LiveProp;
use Symfony\UX\LiveComponent\LiveComponentHydrator;
use Symfony\UX\LiveComponent\Tests\Fixture\Component\Component1;
use Symfony\UX\LiveComponent\Tests\Fixture\Component\Component2;
use Symfony\UX\LiveComponent\Tests\Fixture\Component\Component3;
use Symfony\UX\LiveComponent\Tests\Fixture\Component\ComponentWithAttributes;
use Symfony\UX\LiveComponent\Tests\Fixture\Entity\Entity1;
use Symfony\UX\LiveComponent\Tests\Fixtures\Component\Component1;
use Symfony\UX\LiveComponent\Tests\Fixtures\Component\Component2;
use Symfony\UX\LiveComponent\Tests\Fixtures\Component\Component3;
use Symfony\UX\LiveComponent\Tests\Fixtures\Component\ComponentWithAttributes;
use Symfony\UX\LiveComponent\Tests\Fixtures\Entity\Entity1;
use Symfony\UX\TwigComponent\ComponentFactory;
use function Zenstruck\Foundry\create;
use Zenstruck\Foundry\Test\Factories;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

use PHPUnit\Framework\TestCase;
use Symfony\UX\LiveComponent\Attribute\AsLiveComponent;
use Symfony\UX\LiveComponent\Tests\Fixture\Component\Component5;
use Symfony\UX\LiveComponent\Tests\Fixtures\Component\Component5;

/**
* @author Kevin Bond <[email protected]>
Expand Down
2 changes: 1 addition & 1 deletion src/TwigComponent/phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
>
<php>
<ini name="error_reporting" value="-1" />
<server name="KERNEL_CLASS" value="Symfony\UX\TwigComponent\Tests\Fixture\Kernel" />
<server name="KERNEL_CLASS" value="Symfony\UX\TwigComponent\Tests\Fixtures\Kernel" />
<server name="SYMFONY_DEPRECATIONS_HELPER" value="max[self]=0&amp;max[direct]=0"/>
</php>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
* file that was distributed with this source code.
*/

namespace Symfony\UX\TwigComponent\Tests\Fixture\Component;
namespace Symfony\UX\TwigComponent\Tests\Fixtures\Component;

use Symfony\UX\TwigComponent\Attribute\AsTwigComponent;
use Symfony\UX\TwigComponent\Tests\Fixture\Service\ServiceA;
use Symfony\UX\TwigComponent\Tests\Fixtures\Service\ServiceA;

/**
* @author Kevin Bond <[email protected]>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/

namespace Symfony\UX\TwigComponent\Tests\Fixture\Component;
namespace Symfony\UX\TwigComponent\Tests\Fixtures\Component;

use Symfony\UX\TwigComponent\Attribute\AsTwigComponent;
use Symfony\UX\TwigComponent\Attribute\PostMount;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/

namespace Symfony\UX\TwigComponent\Tests\Fixture\Component;
namespace Symfony\UX\TwigComponent\Tests\Fixtures\Component;

use Symfony\UX\TwigComponent\Attribute\AsTwigComponent;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/

namespace Symfony\UX\TwigComponent\Tests\Fixture\Component;
namespace Symfony\UX\TwigComponent\Tests\Fixtures\Component;

use Symfony\UX\TwigComponent\Attribute\AsTwigComponent;
use Symfony\UX\TwigComponent\HasAttributesTrait;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,19 @@
* file that was distributed with this source code.
*/

namespace Symfony\UX\TwigComponent\Tests\Fixture;
namespace Symfony\UX\TwigComponent\Tests\Fixtures;

use Symfony\Bundle\FrameworkBundle\FrameworkBundle;
use Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait;
use Symfony\Bundle\TwigBundle\TwigBundle;
use Symfony\Component\Config\Loader\LoaderInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\HttpKernel\Kernel as BaseKernel;
use Symfony\UX\TwigComponent\Tests\Fixture\Component\ComponentA;
use Symfony\UX\TwigComponent\Tests\Fixture\Component\ComponentB;
use Symfony\UX\TwigComponent\Tests\Fixture\Component\ComponentC;
use Symfony\UX\TwigComponent\Tests\Fixture\Component\WithAttributes;
use Symfony\UX\TwigComponent\Tests\Fixture\Service\ServiceA;
use Symfony\UX\TwigComponent\Tests\Fixtures\Component\ComponentA;
use Symfony\UX\TwigComponent\Tests\Fixtures\Component\ComponentB;
use Symfony\UX\TwigComponent\Tests\Fixtures\Component\ComponentC;
use Symfony\UX\TwigComponent\Tests\Fixtures\Component\WithAttributes;
use Symfony\UX\TwigComponent\Tests\Fixtures\Service\ServiceA;
use Symfony\UX\TwigComponent\TwigComponentBundle;

/**
Expand All @@ -47,7 +47,7 @@ protected function configureContainer(ContainerBuilder $c, LoaderInterface $load
'secrets' => false,
]);
$c->loadFromExtension('twig', [
'default_path' => '%kernel.project_dir%/tests/Fixture/templates',
'default_path' => '%kernel.project_dir%/tests/Fixtures/templates',
]);

$c->register(ServiceA::class)->setAutoconfigured(true)->setAutowired(true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/

namespace Symfony\UX\TwigComponent\Tests\Fixture\Service;
namespace Symfony\UX\TwigComponent\Tests\Fixtures\Service;

/**
* @author Kevin Bond <[email protected]>
Expand Down
10 changes: 5 additions & 5 deletions src/TwigComponent/tests/Integration/ComponentFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
use Symfony\Component\DependencyInjection\Exception\LogicException;
use Symfony\UX\TwigComponent\ComponentFactory;
use Symfony\UX\TwigComponent\Tests\Fixture\Component\ComponentA;
use Symfony\UX\TwigComponent\Tests\Fixture\Component\ComponentB;
use Symfony\UX\TwigComponent\Tests\Fixture\Component\ComponentC;
use Symfony\UX\TwigComponent\Tests\Fixtures\Component\ComponentA;
use Symfony\UX\TwigComponent\Tests\Fixtures\Component\ComponentB;
use Symfony\UX\TwigComponent\Tests\Fixtures\Component\ComponentC;

/**
* @author Kevin Bond <[email protected]>
Expand Down Expand Up @@ -100,7 +100,7 @@ public function testExceptionThrownIfRequiredMountParameterIsMissingFromPassedDa
$factory = self::getContainer()->get('ux.twig_component.component_factory');

$this->expectException(\LogicException::class);
$this->expectExceptionMessage('Symfony\UX\TwigComponent\Tests\Fixture\Component\ComponentC::mount() has a required $propA parameter. Make sure this is passed or make give a default value.');
$this->expectExceptionMessage('Symfony\UX\TwigComponent\Tests\Fixtures\Component\ComponentC::mount() has a required $propA parameter. Make sure this is passed or make give a default value.');

$factory->create('component_c');
}
Expand All @@ -111,7 +111,7 @@ public function testExceptionThrownIfUnableToWritePassedDataToProperty(): void
$factory = self::getContainer()->get('ux.twig_component.component_factory');

$this->expectException(\LogicException::class);
$this->expectExceptionMessage('Unable to write "service" to component "Symfony\UX\TwigComponent\Tests\Fixture\Component\ComponentA". Make sure this is a writable property or create a mount() with a $service argument.');
$this->expectExceptionMessage('Unable to write "service" to component "Symfony\UX\TwigComponent\Tests\Fixtures\Component\ComponentA". Make sure this is a writable property or create a mount() with a $service argument.');

$factory->create('component_a', ['propB' => 'B', 'service' => 'invalid']);
}
Expand Down