phiamo / MopaBootstrapSandboxBundle

Sandbox Bundle used to seperate live doc from code
http://bootstrap.mohrenweiserpartner.de
Other
24 stars 40 forks source link

Example of nested collection form types usage #41

Closed molchanoviv closed 9 years ago

molchanoviv commented 9 years ago

Hello. @phiamo I prepared an example on nested collection usage like you asked.

phiamo commented 9 years ago

i added a phpunit xml and tried, but i get a strange error which doesnt show up in bootstrapbundle itself https://github.com/phiamo/MopaBootstrapSandboxBundle/tree/molchanoviv-nested_forms_example: There was 1 error:

1) Mopa\Bundle\BootstrapSandboxBundle\Form\Type\ExampleFormsTypeTest::testSubmit with data set #0 (Mopa\Bundle\BootstrapSandboxBundle\Form\Model\ExampleFormsData Object (...), array('test', 1)) RuntimeException: Either set KERNEL_DIR in your phpunit.xml according to http://symfony.com/doc/current/book/testing.html#your-first-functional-test or override the WebTestCase::createKernel() method.

@molchanoviv can you have a look at that would love to setup travis to check that bundle too, then we can release this to the example page a bit more often

molchanoviv commented 9 years ago

KernelTestCase(a parent of TypeTestCase) requires an AppKernel to work. So there is only two things we can do with it. Either remove ExampleFormsTypeTest or add Symfony Standard to repository.

phiamo commented 9 years ago

humpf .... removing a test is never a good idea ;) but adding whole symfony2 just for this, neither. can we just add it for testing?

molchanoviv commented 9 years ago

Yep. We can install symfony only in travis then copy this bundle to src directory and register it, then run tests.

phiamo commented 9 years ago

could you add a pr for that please

molchanoviv commented 9 years ago

Sure. But at first you need to config travis for this repository. I actually can use travis.yml from MopaBootstrapBundle as example but i still need travis to be connected to this repo.

phiamo commented 9 years ago

done, its even running without .travis.yml

molchanoviv commented 9 years ago

Ok tnx. This evening or maybe tomorrow morning i'll write a config for it.

phiamo commented 9 years ago

44 replaces this one, but could you check please @molchanoviv cause replacement of name etc doesnt work as i would expect it to.