Skip to content

Commit 0b1b9e2

Browse files
author
Anton Shevchuk
committed
Updated tests for new version of the PHPUnit
1 parent 86d01ce commit 0b1b9e2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+57
-55
lines changed

codeception.dist.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
actor: Tester
2+
bootstrap: _bootstrap.php
23
paths:
34
tests: tests
45
log: tests/_output
56
data: tests/_data
67
support: tests/_support
78
envs: tests/_envs
89
settings:
9-
bootstrap: _bootstrap.php
1010
colors: true
1111
memory_limit: 1024M
1212
extensions:

composer.json

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,17 @@
1010
"ext-ctype": "*",
1111
"bluzphp/collection": "~1.0",
1212
"cache/cache": "~1.0",
13-
"psr/log": "~1.0",
14-
"laminas/laminas-diactoros": "~2.5",
15-
"laminas/laminas-httphandlerrunner": "~1.3"
13+
"psr/log": "~1.1",
14+
"laminas/laminas-diactoros": "~2.6",
15+
"laminas/laminas-httphandlerrunner": "~1.4"
1616
},
1717
"require-dev": {
18-
"codeception/codeception": "~2.5.3",
19-
"php-coveralls/php-coveralls": "~2.1",
20-
"squizlabs/php_codesniffer": "~3.3",
21-
"phploc/phploc": "~4.0"
18+
"codeception/codeception": "~4.1",
19+
"codeception/module-asserts": "~1.3",
20+
"codeception/module-phpbrowser": "~1.0",
21+
"php-coveralls/php-coveralls": "~2.4",
22+
"squizlabs/php_codesniffer": "~3.6",
23+
"phploc/phploc": "~7.0"
2224
},
2325
"suggest": {
2426
"ext-gettext": "required by Bluz\\Translator (https://github.com/bluzphp/framework/wiki/Translator)",

tests/src/FrameworkTestCase.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,15 @@ class FrameworkTestCase extends Unit
3737
/**
3838
* Setup TestCase
3939
*/
40-
protected function setUp()
40+
protected function setUp(): void
4141
{
4242
self::getApp();
4343
}
4444

4545
/**
4646
* Tear Down
4747
*/
48-
protected function tearDown()
48+
protected function tearDown(): void
4949
{
5050
self::resetApp();
5151
}

tests/unit/Common/ContainerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class ContainerTest extends FrameworkTestCase
3434
* Sets up the fixture, for example, opens a network connection.
3535
* This method is called before a test is executed.
3636
*/
37-
protected function setUp()
37+
protected function setUp(): void
3838
{
3939
$this->class = new ConcreteContainer();
4040
}

tests/unit/Common/HelperTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class HelperTest extends FrameworkTestCase
3232
* Sets up the fixture, for example, opens a network connection.
3333
* This method is called before a test is executed.
3434
*/
35-
protected function setUp()
35+
protected function setUp(): void
3636
{
3737
$this->class = new ConcreteHelpers();
3838
}

tests/unit/Common/NilTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class NilTest extends FrameworkTestCase
2929
* Sets up the fixture, for example, opens a network connection.
3030
* This method is called before a test is executed.
3131
*/
32-
protected function setUp()
32+
protected function setUp(): void
3333
{
3434
$this->nil = new Nil();
3535
}

tests/unit/Common/OptionsTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class OptionsTest extends FrameworkTestCase
3434
* Sets up the fixture, for example, opens a network connection.
3535
* This method is called before a test is executed.
3636
*/
37-
protected function setUp()
37+
protected function setUp(): void
3838
{
3939
$this->class = new ConcreteOptions();
4040
$this->options = ['foo' => 'bar', 'foo bar' => 'qux', 'baz' => ['foo' => 'bar'], 'moo' => 'Moo'];

tests/unit/Controller/ControllerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class ControllerTest extends FrameworkTestCase
2727
/**
2828
* Create `index/index` controller
2929
*/
30-
public function setUp()
30+
public function setUp(): void
3131
{
3232
$this->controller = self::getApp()->dispatch('index', 'index');
3333
}

tests/unit/Controller/Mapper/CrudTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,15 @@ class CrudTest extends FrameworkTestCase
2828
*/
2929
protected $mapper;
3030

31-
public function setUp()
31+
public function setUp(): void
3232
{
3333
parent::setUp();
3434
$crudTable = TableCrud::getInstance();
3535
$crudTable->setTable(Table::getInstance());
3636
$this->mapper = new Crud($crudTable);
3737
}
3838

39-
public function tearDown()
39+
public function tearDown(): void
4040
{
4141
parent::tearDown();
4242
TableCrud::getInstance()->resetTable();

tests/unit/Controller/Mapper/RestTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,15 @@ class RestTest extends FrameworkTestCase
2929
*/
3030
protected $mapper;
3131

32-
public function setUp()
32+
public function setUp(): void
3333
{
3434
parent::setUp();
3535
$crudTable = TableCrud::getInstance();
3636
$crudTable->setTable(Table::getInstance());
3737
$this->mapper = new Rest($crudTable);
3838
}
3939

40-
public function tearDown()
40+
public function tearDown(): void
4141
{
4242
parent::tearDown();
4343
TableCrud::getInstance()->resetTable();

0 commit comments

Comments
 (0)