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

Tests: fix TestCase for phpunit 9 #1221

Merged
merged 1 commit into from
Jan 27, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tests/unit/Data/UsernameGeneratorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class UsernameGeneratorTest extends TestCase
{
private $usernameGenerator;

public function setUp()
public function setUp(): void
{
// Create a stub for the Gibbon\Contracts\Database\Connection class
$mockPDO = $this->createMock(Connection::class);
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/Domain/QueryCriteriaTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class QueryCriteriaTest extends TestCase
*/
private $criteria;

public function setUp()
public function setUp(): void
{
$this->criteria = new QueryCriteria();
}
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/Domain/QueryableGatewayTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class QueryableGatewayTest extends TestCase
{
private $gateway;

public function setUp()
public function setUp(): void
{
$this->gateway = $this
->getMockBuilder(QueryableGateway::class)
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/Domain/System/ModuleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class ModuleTest extends TestCase
{
protected $module;

public function setUp()
public function setUp(): void
{
$this->module = $this->getMockBuilder(Module::class)
->setConstructorArgs([])
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/Domain/System/ThemeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class ThemeTest extends TestCase
{
protected $theme;

public function setUp()
public function setUp(): void
{
$this->theme = $this->getMockBuilder(Theme::class)
->setConstructorArgs([])
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/Forms/Layout/RowTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class RowTest extends TestCase
private $mockFactory;
private $mockElement;

public function setUp()
public function setUp(): void
{
$this->mockFactory = $this->createMock('Gibbon\Forms\FormFactoryInterface');
$this->mockElement = $this->createMock('Gibbon\Forms\OutputableInterface');
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/Gibbon/FileUploaderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class FileUploaderTest extends TestCase

private $fileUploader;

public function setUp()
public function setUp(): void
{
// Mock the database results for a gibbonFileExtensions query
$mockResults = $this->createMock(\PDOStatement::class);
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/Gibbon/Locale/TranslateNTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class TranslateNTest extends TestCase
private $locale;
private $gibbonToRestore;

public function setUp()
public function setUp(): void
{

// Setup the composer autoloader
Expand Down Expand Up @@ -57,7 +57,7 @@ public function setUp()
];
}

public function tearDown()
public function tearDown(): void
{
global $gibbon;
unset($gibbon);
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/Gibbon/Locale/TranslateTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class TranslateTest extends TestCase
private $locale;
private $gibbonToRestore;

public function setUp()
public function setUp(): void
{

// Setup the composer autoloader
Expand Down Expand Up @@ -57,7 +57,7 @@ public function setUp()
];
}

public function tearDown()
public function tearDown(): void
{
global $gibbon;
unset($gibbon);
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/Gibbon/TranslationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class TranslationTest extends TestCase
{
protected $guid;

public function setUp()
public function setUp(): void
{
global $guid, $gibbon;

Expand All @@ -28,7 +28,7 @@ public function setUp()
$this->guid = $guid;
}

public function tearDown()
public function tearDown(): void
{
global $gibbon;

Expand Down
2 changes: 1 addition & 1 deletion tests/unit/Installer/ProcessConfigVarsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class ProcessConfigVarsTest extends TestCase {
/**
* @inherit
*/
public function setUp() {
public function setUp(): void {
$loader = new \Twig\Loader\FilesystemLoader(__DIR__ . '/../../../resources/templates');
$this->templateEngine = new \Twig\Environment($loader);
}
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/Services/FormatTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/
class FormatTest extends TestCase
{
public function setUp()
public function setUp(): void
{
$settings = [
'code' => 'en_GB',
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/View/PageTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class PageTest extends TestCase
protected $mockModule;
protected $mockTheme;

public function setUp()
public function setUp(): void
{
$this->prebuiltPage = new Page(null, [
'module' => new Module(),
Expand Down