[ArchetypeBundle] Missing spec and configuration

This commit is contained in:
Arnaud Langlade 2015-06-12 13:23:49 +02:00
parent 3a5726e14e
commit 7c7e924dec
4 changed files with 47 additions and 2 deletions

View file

@ -1,8 +1,9 @@
suites:
Addressing : { namespace: Sylius\Component\Addressing, psr4_prefix: Sylius\Component\Addressing, spec_path: src/Sylius/Component/Addressing, src_path: src/Sylius/Component/Addressing }
Attribute : { namespace: Sylius\Component\Attribute, psr4_prefix: Sylius\Component\Attribute, spec_path: src/Sylius/Component/Attribute, src_path: src/Sylius/Component/Attribute }
Archetype : { namespace: Sylius\Component\Archetype, psr4_prefix: Sylius\Component\Archetype, spec_path: src/Sylius/Component/Archetype, src_path: src/Sylius/Component/Archetype }
Cart : { namespace: Sylius\Component\Cart, psr4_prefix: Sylius\Component\Cart, spec_path: src/Sylius/Component/Cart, src_path: src/Sylius/Component/Cart }
Channel : { namespace: Sylius\Component\Channel, psr4_prefix: Sylius\Component\Channel, spec_path: src/Sylius/Component/Channel, src_path: src/Sylius/Component/Channel }
Channel : { namespace: Sylius\Component\Channel, psr4_prefix: Sylius\Component\Channel, spec_path: src/Sylius/Component/Channel, src_path: src/Sylius/Component/Channel }
Core : { namespace: Sylius\Component\Core, psr4_prefix: Sylius\Component\Core, spec_path: src/Sylius/Component/Core, src_path: src/Sylius/Component/Core }
Contact : { namespace: Sylius\Component\Contact, psr4_prefix: Sylius\Component\Contact, spec_path: src/Sylius/Component/Contact, src_path: src/Sylius/Component/Contact }
Currency : { namespace: Sylius\Component\Currency, psr4_prefix: Sylius\Component\Currency, spec_path: src/Sylius/Component/Currency, src_path: src/Sylius/Component/Currency }
@ -33,6 +34,7 @@ suites:
AddressingBundle : { namespace: Sylius\Bundle\AddressingBundle, psr4_prefix: Sylius\Bundle\AddressingBundle, spec_path: src/Sylius/Bundle/AddressingBundle, src_path: src/Sylius/Bundle/AddressingBundle }
AttributeBundle : { namespace: Sylius\Bundle\AttributeBundle, psr4_prefix: Sylius\Bundle\AttributeBundle, spec_path: src/Sylius/Bundle/AttributeBundle, src_path: src/Sylius/Bundle/AttributeBundle }
ArchetypeBundle : { namespace: Sylius\Bundle\ArchetypeBundle, psr4_prefix: Sylius\Bundle\ArchetypeBundle, spec_path: src/Sylius/Bundle/ArchetypeBundle, src_path: src/Sylius/Bundle/ArchetypeBundle }
CartBundle : { namespace: Sylius\Bundle\CartBundle, psr4_prefix: Sylius\Bundle\CartBundle, spec_path: src/Sylius/Bundle/CartBundle, src_path: src/Sylius/Bundle/CartBundle }
CoreBundle : { namespace: Sylius\Bundle\CoreBundle, psr4_prefix: Sylius\Bundle\CoreBundle, spec_path: src/Sylius/Bundle/CoreBundle, src_path: src/Sylius/Bundle/CoreBundle }
CurrencyBundle : { namespace: Sylius\Bundle\CurrencyBundle, psr4_prefix: Sylius\Bundle\CurrencyBundle , spec_path: src/Sylius/Bundle/CurrencyBundle, src_path: src/Sylius/Bundle/CurrencyBundle }

View file

@ -0,0 +1,37 @@
<?php
namespace spec\Sylius\Bundle\ArchetypeBundle\Form\Type;
use PhpSpec\ObjectBehavior;
use Prophecy\Argument;
use Symfony\Component\Form\FormBuilderInterface;
class ArchetypeTranslationTypeSpec extends ObjectBehavior
{
function let()
{
$this->beConstructedWith('ArchetypeTranslation', array('sylius'), 'subject');
}
function it_is_initializable()
{
$this->shouldHaveType('Sylius\Bundle\ArchetypeBundle\Form\Type\ArchetypeTranslationType');
}
function it_is_a_form()
{
$this->shouldHaveType('Sylius\Bundle\ResourceBundle\Form\Type\AbstractResourceType');
}
function it_buils_a_form(FormBuilderInterface $builder)
{
$builder->add('name', 'text', Argument::type('array'))->shouldBeCalled();
$this->buildForm($builder, array());
}
function it_has_a_name()
{
$this->getName()->shouldReturn('sylius_subject_archetype_translation');
}
}

View file

@ -44,7 +44,7 @@ class ArchetypeTypeSpec extends ObjectBehavior
;
$builder
->add('name', 'text', Argument::any())
->add('translations', 'a2lix_translationsForms', Argument::any())
->willReturn($builder)
;

View file

@ -24,6 +24,12 @@ use Sylius\Component\Variation\Model\OptionInterface;
*/
class ArchetypeSpec extends ObjectBehavior
{
function let()
{
$this->setCurrentLocale('en_US');
$this->setFallbackLocale('en_US');
}
function it_is_initializable()
{
$this->shouldHaveType('Sylius\Component\Archetype\Model\Archetype');