symfony: Error: Call to undefined method createMock()
Q | A |
---|---|
Bug report? | yes |
Feature request? | no |
BC Break report? | no |
Symfony version | 2.8.15 |
I tried to test a FormType with invalid_message and I followed the doc for adding extensions.
I got this error :
Error: Call to undefined method AppBundle\Test\Form\Type\AlertTypeTest::createMock()
...AppBundle/Tests/Form/Type/AlertTypeTest.php:18
...vendor/symfony/symfony/src/Symfony/Component/Form/Test/FormIntegrationTestCase.php:30
...vendor/symfony/symfony/src/Symfony/Component/Form/Test/TypeTestCase.php:31
And if I change createMock by getMock, I had an other error :
Call to a member function addConstraint() on null
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 15 (10 by maintainers)
@iltar Symfony itself doesn’t make use of
createMock()
yet. It’s just the documentation where we at some point made changes that are incompatible with PHPUnit < 5.4.