Skip to content
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

Stable v0.1 - move from CoreBundle #92

Merged
merged 1 commit into from
Jun 4, 2020

Conversation

wbloszyk
Copy link
Member

Subject

This RP migrate Form from CoreBundle upgraded in sonata-project/SonataCoreBundle#741 process.

I am targeting this branch, because 0.x have not stable release yet.

Part of sonata-project/dev-kit#697

@wbloszyk
Copy link
Member Author

@contributors Anyone can help? Travis fails but tests pass.

It is not RTM yet.

@VincentLanglet
Copy link
Member

@contributors Anyone can help? Travis fails but tests pass.

You added tests which did not perform any assertions. You have to fix this.

1) Sonata\Form\Tests\Type\BasePickerTypeTest::testConstructorLegacy
This test did not perform any assertions
/home/travis/build/sonata-project/form-extensions/tests/Type/BasePickerTypeTest.php:103
2) Sonata\Form\Tests\Type\BooleanTypeTest::testBuildForm
This test did not perform any assertions
/home/travis/build/sonata-project/form-extensions/tests/Type/BooleanTypeTest.php:27
3) Sonata\Form\Tests\Type\CollectionTypeTest::testBuildForm
This test did not perform any assertions
/home/travis/build/sonata-project/form-extensions/tests/Type/CollectionTypeTest.php:24
4) Sonata\Form\Tests\Type\DatePickerTypeTest::testBuildForm
This test did not perform any assertions
/home/travis/build/sonata-project/form-extensions/tests/Type/DatePickerTypeTest.php:29
5) Sonata\Form\Tests\Type\DateTimePickerTypeTest::testBuildForm
This test did not perform any assertions
/home/travis/build/sonata-project/form-extensions/tests/Type/DateTimePickerTypeTest.php:29
6) Sonata\Form\Tests\Type\EqualTypeTest::testBuildForm
This test did not perform any assertions
/home/travis/build/sonata-project/form-extensions/tests/Type/EqualTypeTest.php:26
7) Sonata\Form\Tests\Type\ImmutableArrayTypeTest::testBuildForm
This test did not perform any assertions
/home/travis/build/sonata-project/form-extensions/tests/Type/ImmutableArrayTypeTest.php:29

@wbloszyk
Copy link
Member Author

I think this should be ignore. This tests is working in specifical configuration. I will fix it in Monday.

@VincentLanglet
Copy link
Member

I think this should be ignore. This tests is working in specifical configuration. I will fix it in Monday.

There is something like a DoesNotPerformAssertion annotation.

But I think, the report is interesting. When a testBuildForm report no assertion and the test contains

$formBuilder
            ->expects($this->any())
            ->method('add')
            ->willReturnCallback(function ($name, $type = null) {
                if (null !== $type) {
                    $this->assertTrue(class_exists($type), sprintf('Unable to ensure %s is a FQCN', $type));
                }
            });

This would mean that this code is useless.

@wbloszyk wbloszyk force-pushed the form_extensions_from_core branch 4 times, most recently from f2cc302 to 3651ed9 Compare May 25, 2020 17:37
@wbloszyk wbloszyk marked this pull request as draft May 25, 2020 19:11
@wbloszyk wbloszyk marked this pull request as ready for review May 25, 2020 20:27
@greg0ire
Copy link
Contributor

Yup, @doesNotPerformAssertions should do the trick.

@wbloszyk
Copy link
Member Author

I will revert this in Monday.

@VincentLanglet VincentLanglet requested a review from a team May 31, 2020 21:57
@wbloszyk wbloszyk force-pushed the form_extensions_from_core branch 4 times, most recently from 9889bcb to 0b54885 Compare June 3, 2020 10:55
src/Bridge/Symfony/SonataFormBundle.php Show resolved Hide resolved
src/Test/AbstractWidgetTestCase.php Outdated Show resolved Hide resolved
src/Test/AbstractWidgetTestCase.php Show resolved Hide resolved
src/Type/BasePickerType.php Show resolved Hide resolved
src/Type/EqualType.php Show resolved Hide resolved
@wbloszyk wbloszyk force-pushed the form_extensions_from_core branch from 0b54885 to ed59bf2 Compare June 3, 2020 13:22
@wbloszyk wbloszyk requested a review from jordisala1991 June 3, 2020 13:23
@jordisala1991 jordisala1991 requested a review from a team June 3, 2020 17:27
@greg0ire greg0ire merged commit 71a84ea into sonata-project:0.x Jun 4, 2020
@greg0ire
Copy link
Contributor

greg0ire commented Jun 4, 2020

Thanks @wbloszyk !

@wbloszyk wbloszyk deleted the form_extensions_from_core branch June 4, 2020 07:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants