Skip to content

Commit

Permalink
Update test suite
Browse files Browse the repository at this point in the history
  • Loading branch information
richardhj committed Apr 4, 2021
1 parent 041f0ba commit d5c290a
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 14 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
language: php

php:
- 7.1
- 7.2
- 7.3
- 7.4
Expand Down
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"source": "https://github.com/terminal42/contao-url-rewrite"
},
"require": {
"php": ">=7.1",
"php": ">=7.2",
"codefog/contao-haste": "^4.20",
"contao/core-bundle": "^4.4",
"symfony/config": "^3.3 || ^4.0 || ^5.0",
Expand All @@ -31,9 +31,9 @@
"contao/calendar-bundle": "^4.4",
"contao/faq-bundle": "^4.4",
"contao/news-bundle": "^4.4",
"contao/test-case": "^2.0",
"contao/test-case": "^4.0",
"friendsofphp/php-cs-fixer": "^2.2",
"phpunit/phpunit": "^7.0",
"phpunit/phpunit": "^8.0",
"php-coveralls/php-coveralls": "^2.4",
"symfony-cmf/routing": "^2.1"
},
Expand Down
2 changes: 1 addition & 1 deletion tests/ConfigProvider/BundleConfigProviderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class BundleConfigProviderTest extends TestCase
/**
* @inheritDoc
*/
protected function setUp()
protected function setUp(): void
{
$this->provider = new BundleConfigProvider([
// Invalid entry
Expand Down
4 changes: 2 additions & 2 deletions tests/Controller/RewriteControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ private function mockContaoFramework()
$insertTags = $this
->getMockBuilder(Adapter::class)
->disableOriginalConstructor()
->setMethods(['replace'])
->addMethods(['replace'])
->getMock()
;

Expand Down Expand Up @@ -187,7 +187,7 @@ private function mockRequest($urlRewrite = null, $routeParams = [], $query = [])
[],
$attributes
])
->setMethods(['getSchemeAndHttpHost', 'getBasePath'])
->onlyMethods(['getSchemeAndHttpHost', 'getBasePath'])
->getMock()
;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class ConfigProviderPassTest extends TestCase
*/
private $pass;

public function setUp()
public function setUp(): void
{
$this->pass = new ConfigProviderPass('alias', 'chain', 'tag');
}
Expand Down
4 changes: 2 additions & 2 deletions tests/EventListener/AbstractContainerListenerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ abstract class AbstractContainerListenerTest extends ContaoTestCase
*/
private $inputAdapter;

protected function setUp()
protected function setUp(): void
{
$this->cacheDir = __DIR__ . '/tmp';

Expand All @@ -56,7 +56,7 @@ protected function setUp()

abstract protected function getRouter();

protected function tearDown()
protected function tearDown(): void
{
$this->fs->remove($this->cacheDir);
}
Expand Down
8 changes: 4 additions & 4 deletions tests/EventListener/InsertTagsListenerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ public function testOnInsertFlagsEventUrl($provided, $expected)
$listener = $this
->getMockBuilder(InsertTagsListener::class)
->setConstructorArgs([$this->createFrameworkMock($provided[0])])
->setMethods(['classExists'])
->onlyMethods(['classExists'])
->getMock()
;

Expand Down Expand Up @@ -339,7 +339,7 @@ public function testOnInsertFlagsFaqUrl($provided, $expected)
$listener = $this
->getMockBuilder(InsertTagsListener::class)
->setConstructorArgs([$this->createFrameworkMock($provided[0])])
->setMethods(['classExists'])
->onlyMethods(['classExists'])
->getMock()
;

Expand Down Expand Up @@ -423,7 +423,7 @@ public function testOnInsertFlagsNewsUrl($provided, $expected)
$listener = $this
->getMockBuilder(InsertTagsListener::class)
->setConstructorArgs([$this->createFrameworkMock($provided[0])])
->setMethods(['classExists'])
->onlyMethods(['classExists'])
->getMock()
;

Expand Down Expand Up @@ -575,7 +575,7 @@ private function createAdapterMock(array $methods = [])
return $this
->getMockBuilder(Adapter::class)
->disableOriginalConstructor()
->setMethods($methods)
->addMethods($methods)
->getMock()
;
}
Expand Down

0 comments on commit d5c290a

Please sign in to comment.