Skip to content

Commit

Permalink
Bump PHPUnit to 8.3
Browse files Browse the repository at this point in the history
  • Loading branch information
emodric committed Aug 2, 2019
1 parent 0ad6c09 commit d07393b
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 13 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ composer.phar
composer.lock
phpunit.phar
.php_cs.cache
.phpunit.result.cache
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"twig/twig": "^2.4.4"
},
"require-dev": {
"phpunit/phpunit": "^8.2",
"phpunit/phpunit": "^8.3",
"netgen/ez-forms-bundle": "^3.0",
"friendsofphp/php-cs-fixer": "^2.15.1"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ protected function setUp(): void
{
$this->gateway = $this->getMockBuilder(EnhancedSelectionStorage\Gateway\DoctrineStorage::class)
->disableOriginalConstructor()
->setMethods(['deleteFieldData', 'storeFieldData', 'getFieldData'])
->onlyMethods(['deleteFieldData', 'storeFieldData', 'getFieldData'])
->getMock();

$this->storage = new EnhancedSelectionStorage($this->gateway);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ protected function setUp(): void

$this->db = $this->getMockBuilder(ConnectionHandler::class)
->disableOriginalConstructor()
->setMethods(['createSelectQuery', 'quoteColumn'])
->onlyMethods(['createSelectQuery', 'quoteColumn'])
->getMock();

$this->handler = new EnhancedSelection($this->db);
Expand All @@ -65,7 +65,6 @@ public function testHandleWithoutFieldDefinitions(): void

$criteriaConverter = $this->getMockBuilder(CriteriaConverter::class)
->disableOriginalConstructor()
->setMethods([])
->getMock();

$connection = $this->getMockBuilder(Connection::class)
Expand All @@ -74,12 +73,12 @@ public function testHandleWithoutFieldDefinitions(): void

$query = $this->getMockBuilder(SelectDoctrineQuery::class)
->setConstructorArgs([$connection])
->setMethods(['prepare'])
->onlyMethods(['prepare'])
->getMock();

$statement = $this->getMockBuilder(Statement::class)
->disableOriginalConstructor()
->setMethods(['execute', 'fetchAll'])
->onlyMethods(['execute', 'fetchAll'])
->getMock();

$statement->expects(self::once())
Expand All @@ -104,7 +103,6 @@ public function testHandle(): void
{
$criteriaConverter = $this->getMockBuilder(CriteriaConverter::class)
->disableOriginalConstructor()
->setMethods([])
->getMock();

$connection = $this->getMockBuilder(Connection::class)
Expand All @@ -113,12 +111,12 @@ public function testHandle(): void

$query = $this->getMockBuilder(SelectDoctrineQuery::class)
->setConstructorArgs([$connection])
->setMethods(['prepare'])
->onlyMethods(['prepare'])
->getMock();

$statement = $this->getMockBuilder(Statement::class)
->disableOriginalConstructor()
->setMethods(['execute', 'fetchAll'])
->onlyMethods(['execute', 'fetchAll'])
->getMock();

$statement->expects(self::once())
Expand Down
4 changes: 2 additions & 2 deletions tests/Form/FieldTypeHandler/EnhancedSelectionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class EnhancedSelectionTest extends TestCase
protected function setUp(): void
{
$this->configResolver = $this->getMockBuilder(ConfigResolverInterface::class)
->setMethods(['hasParameter', 'getParameter', 'setDefaultNamespace', 'getDefaultNamespace'])
->onlyMethods(['hasParameter', 'getParameter', 'setDefaultNamespace', 'getDefaultNamespace'])
->disableOriginalConstructor()
->getMock();

Expand Down Expand Up @@ -114,7 +114,7 @@ public function testBuildFieldCreateForm(): void
{
$formBuilder = $this->getMockBuilder(FormBuilder::class)
->disableOriginalConstructor()
->setMethods(['add'])
->onlyMethods(['add'])
->getMock();

$formBuilder->expects(self::once())
Expand Down
4 changes: 2 additions & 2 deletions tests/Templating/Twig/NetgenEnhancedSelectionRuntimeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@ protected function setUp(): void
{
$this->translationHelper = $this->getMockBuilder(TranslationHelper::class)
->disableOriginalConstructor()
->setMethods(['getTranslatedField'])
->onlyMethods(['getTranslatedField'])
->getMock();

$this->contentTypeService = $this->getMockBuilder(ContentTypeService::class)
->disableOriginalConstructor()
->setMethods(['loadContentType'])
->onlyMethods(['loadContentType'])
->getMockForAbstractClass();

$this->runtime = new NetgenEnhancedSelectionRuntime($this->contentTypeService, $this->translationHelper);
Expand Down

0 comments on commit d07393b

Please sign in to comment.