diff --git a/codeception.yml b/codeception.yml
index 4b41baa97..e968b8504 100644
--- a/codeception.yml
+++ b/codeception.yml
@@ -2,7 +2,7 @@ actor: Tester
bootstrap: _bootstrap.php
paths:
tests: tests
- log: tests/_output
+ output: tests/_output
data: tests/_data
support: tests/_support
envs: tests/_envs
diff --git a/composer.json b/composer.json
index e20d43758..f82ad1c6a 100644
--- a/composer.json
+++ b/composer.json
@@ -68,13 +68,13 @@
"multiavatar/multiavatar-php": "^1.0"
},
"require-dev": {
- "codeception/codeception": "^5.0",
+ "codeception/codeception": "^5.1",
"phpstan/phpstan": "^1.12",
"phpstan/phpstan-deprecation-rules": "^1.2",
"phpunit/php-code-coverage": "~9.2",
"getgrav/markdowndocs": "^2.0",
- "codeception/module-asserts": "^3.0",
- "codeception/module-phpbrowser": "^3.0"
+ "codeception/module-asserts": "*",
+ "codeception/module-phpbrowser": "*"
},
"repositories": [
{
diff --git a/composer.lock b/composer.lock
index 2021c4c26..57f648ce3 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "a11f7fe97247357a2dfe64210d20615b",
+ "content-hash": "f0dd39cd25f1a10bfd5277beac4e826e",
"packages": [
{
"name": "antoligy/dom-string-iterators",
@@ -3885,25 +3885,25 @@
"packages-dev": [
{
"name": "behat/gherkin",
- "version": "v4.9.0",
+ "version": "v4.10.0",
"source": {
"type": "git",
"url": "https://github.com/Behat/Gherkin.git",
- "reference": "0bc8d1e30e96183e4f36db9dc79caead300beff4"
+ "reference": "cbb83c4c435dd8d05a161f2a5ae322e61b2f4db6"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/Behat/Gherkin/zipball/0bc8d1e30e96183e4f36db9dc79caead300beff4",
- "reference": "0bc8d1e30e96183e4f36db9dc79caead300beff4",
+ "url": "https://api.github.com/repos/Behat/Gherkin/zipball/cbb83c4c435dd8d05a161f2a5ae322e61b2f4db6",
+ "reference": "cbb83c4c435dd8d05a161f2a5ae322e61b2f4db6",
"shasum": ""
},
"require": {
"php": "~7.2|~8.0"
},
"require-dev": {
- "cucumber/cucumber": "dev-gherkin-22.0.0",
+ "cucumber/cucumber": "dev-gherkin-24.1.0",
"phpunit/phpunit": "~8|~9",
- "symfony/yaml": "~3|~4|~5"
+ "symfony/yaml": "~3|~4|~5|~6|~7"
},
"suggest": {
"symfony/yaml": "If you want to parse features, represented in YAML files"
@@ -3942,9 +3942,9 @@
],
"support": {
"issues": "https://github.com/Behat/Gherkin/issues",
- "source": "https://github.com/Behat/Gherkin/tree/v4.9.0"
+ "source": "https://github.com/Behat/Gherkin/tree/v4.10.0"
},
- "time": "2021-10-12T13:05:09+00:00"
+ "time": "2024-10-19T14:46:06+00:00"
},
{
"name": "codeception/codeception",
@@ -4641,16 +4641,16 @@
},
{
"name": "guzzlehttp/promises",
- "version": "2.0.3",
+ "version": "2.0.4",
"source": {
"type": "git",
"url": "https://github.com/guzzle/promises.git",
- "reference": "6ea8dd08867a2a42619d65c3deb2c0fcbf81c8f8"
+ "reference": "f9c436286ab2892c7db7be8c8da4ef61ccf7b455"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/guzzle/promises/zipball/6ea8dd08867a2a42619d65c3deb2c0fcbf81c8f8",
- "reference": "6ea8dd08867a2a42619d65c3deb2c0fcbf81c8f8",
+ "url": "https://api.github.com/repos/guzzle/promises/zipball/f9c436286ab2892c7db7be8c8da4ef61ccf7b455",
+ "reference": "f9c436286ab2892c7db7be8c8da4ef61ccf7b455",
"shasum": ""
},
"require": {
@@ -4704,7 +4704,7 @@
],
"support": {
"issues": "https://github.com/guzzle/promises/issues",
- "source": "https://github.com/guzzle/promises/tree/2.0.3"
+ "source": "https://github.com/guzzle/promises/tree/2.0.4"
},
"funding": [
{
@@ -4720,7 +4720,7 @@
"type": "tidelift"
}
],
- "time": "2024-07-18T10:29:17+00:00"
+ "time": "2024-10-17T10:06:22+00:00"
},
{
"name": "masterminds/html5",
@@ -5027,16 +5027,16 @@
},
{
"name": "phpstan/phpstan",
- "version": "1.12.6",
+ "version": "1.12.7",
"source": {
"type": "git",
"url": "https://github.com/phpstan/phpstan.git",
- "reference": "dc4d2f145a88ea7141ae698effd64d9df46527ae"
+ "reference": "dc2b9976bd8b0f84ec9b0e50cc35378551de7af0"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phpstan/phpstan/zipball/dc4d2f145a88ea7141ae698effd64d9df46527ae",
- "reference": "dc4d2f145a88ea7141ae698effd64d9df46527ae",
+ "url": "https://api.github.com/repos/phpstan/phpstan/zipball/dc2b9976bd8b0f84ec9b0e50cc35378551de7af0",
+ "reference": "dc2b9976bd8b0f84ec9b0e50cc35378551de7af0",
"shasum": ""
},
"require": {
@@ -5081,7 +5081,7 @@
"type": "github"
}
],
- "time": "2024-10-06T15:03:59+00:00"
+ "time": "2024-10-18T11:12:07+00:00"
},
{
"name": "phpstan/phpstan-deprecation-rules",
diff --git a/tests/_support/Helper/Unit.php b/tests/_support/Helper/Unit.php
index 74ef5a6b8..fca98844d 100644
--- a/tests/_support/Helper/Unit.php
+++ b/tests/_support/Helper/Unit.php
@@ -60,31 +60,4 @@ class Unit extends Codeception\Module
{
}
- /**
- * HOOK: before each suite
- *
- * @param Codeception\TestCase $test
- */
- public function _before(Codeception\TestCase $test)
- {
- }
-
- /**
- * HOOK: before each suite
- *
- * @param Codeception\TestCase $test
- */
- public function _after(Codeception\TestCase $test)
- {
- }
-
- /**
- * HOOK: on fail
- *
- * @param Codeception\TestCase $test
- * @param $fail
- */
- public function _failed(Codeception\TestCase $test, $fail)
- {
- }
}
diff --git a/tests/acceptance.suite.yml b/tests/acceptance.suite.yml
index 2734f47d7..1efb88a0b 100644
--- a/tests/acceptance.suite.yml
+++ b/tests/acceptance.suite.yml
@@ -4,7 +4,7 @@
# Perform tests in browser using the WebDriver or PhpBrowser.
# If you need both WebDriver and PHPBrowser tests - create a separate suite.
-class_name: AcceptanceTester
+class: AcceptanceTester
modules:
enabled:
- PhpBrowser:
diff --git a/tests/functional.suite.yml b/tests/functional.suite.yml
index 075765bd9..2ffb52053 100644
--- a/tests/functional.suite.yml
+++ b/tests/functional.suite.yml
@@ -4,7 +4,7 @@
# Emulate web requests and make application process them
# Include one of framework modules (Symfony2, Yii2, Laravel5) to use it
-class_name: FunctionalTester
+class: FunctionalTester
modules:
enabled:
# add framework module here
diff --git a/tests/functional/Grav/Console/DirectInstallCommandTest.php b/tests/functional/Grav/Console/DirectInstallCommandTest.php
index 4f7199862..76beb1fc7 100644
--- a/tests/functional/Grav/Console/DirectInstallCommandTest.php
+++ b/tests/functional/Grav/Console/DirectInstallCommandTest.php
@@ -7,7 +7,7 @@ use Grav\Console\Gpm\DirectInstallCommand;
/**
* Class DirectInstallCommandTest
*/
-class DirectInstallCommandTest extends \Codeception\TestCase\Test
+class DirectInstallCommandTest extends \PHPUnit\Framework\TestCase
{
/** @var Grav $grav */
protected $grav;
@@ -16,9 +16,10 @@ class DirectInstallCommandTest extends \Codeception\TestCase\Test
protected $directInstall;
- protected function _before(): void
+ protected function setUp(): void
{
- $this->grav = Fixtures::get('grav');
+ parent::setUp();
+$this->grav = Fixtures::get('grav');
$this->directInstallCommand = new DirectInstallCommand();
}
}
diff --git a/tests/unit.suite.yml b/tests/unit.suite.yml
index 02dc9b1e0..2e32b569d 100644
--- a/tests/unit.suite.yml
+++ b/tests/unit.suite.yml
@@ -2,7 +2,7 @@
#
# Suite for unit (internal) tests.
-class_name: UnitTester
+class: UnitTester
modules:
enabled:
- Asserts
diff --git a/tests/unit/Grav/Common/AssetsTest.php b/tests/unit/Grav/Common/AssetsTest.php
index 57539a6f3..817f52fe4 100644
--- a/tests/unit/Grav/Common/AssetsTest.php
+++ b/tests/unit/Grav/Common/AssetsTest.php
@@ -7,7 +7,7 @@ use Grav\Common\Assets;
/**
* Class AssetsTest
*/
-class AssetsTest extends \Codeception\TestCase\Test
+class AssetsTest extends \PHPUnit\Framework\TestCase
{
/** @var Grav $grav */
protected $grav;
@@ -15,14 +15,15 @@ class AssetsTest extends \Codeception\TestCase\Test
/** @var Assets $assets */
protected $assets;
- protected function _before(): void
+ protected function setUp(): void
{
+ parent::setUp();
$grav = Fixtures::get('grav');
$this->grav = $grav();
$this->assets = $this->grav['assets'];
}
- protected function _after(): void
+ protected function tearDown(): void
{
}
@@ -565,12 +566,12 @@ class AssetsTest extends \Codeception\TestCase\Test
$this->assets->add('test.css', null, true);
$this->assets->setCssPipeline(true);
$css = $this->assets->css();
- self::assertRegExp('##', $css);
+ self::assertMatchesRegularExpression('##', $css);
//Add a core Grav CSS file, which is found. Pipeline will now return a file
$this->assets->add('/system/assets/debugger/phpdebugbar', null, true);
$css = $this->assets->css();
- self::assertRegExp('##', $css);
+ self::assertMatchesRegularExpression('##', $css);
}
public function testPipelineWithTimestamp(): void
@@ -582,7 +583,7 @@ class AssetsTest extends \Codeception\TestCase\Test
//Add a core Grav CSS file, which is found. Pipeline will now return a file
$this->assets->add('/system/assets/debugger.css', null, true);
$css = $this->assets->css();
- self::assertRegExp('##', $css);
+ self::assertMatchesRegularExpression('##', $css);
}
public function testInline(): void
diff --git a/tests/unit/Grav/Common/BrowserTest.php b/tests/unit/Grav/Common/BrowserTest.php
index a1033d8c9..c44dffecb 100644
--- a/tests/unit/Grav/Common/BrowserTest.php
+++ b/tests/unit/Grav/Common/BrowserTest.php
@@ -6,18 +6,19 @@ use Grav\Common\Grav;
/**
* Class BrowserTest
*/
-class BrowserTest extends \Codeception\TestCase\Test
+class BrowserTest extends \PHPUnit\Framework\TestCase
{
/** @var Grav $grav */
protected $grav;
- protected function _before(): void
+ protected function setUp(): void
{
+ parent::setUp();
$grav = Fixtures::get('grav');
$this->grav = $grav();
}
- protected function _after(): void
+ protected function tearDown(): void
{
}
diff --git a/tests/unit/Grav/Common/ComposerTest.php b/tests/unit/Grav/Common/ComposerTest.php
index 8c73a1fc3..b4f47d84c 100644
--- a/tests/unit/Grav/Common/ComposerTest.php
+++ b/tests/unit/Grav/Common/ComposerTest.php
@@ -3,13 +3,13 @@
use Codeception\Util\Fixtures;
use Grav\Common\Composer;
-class ComposerTest extends \Codeception\TestCase\Test
+class ComposerTest extends \PHPUnit\Framework\TestCase
{
- protected function _before(): void
+ protected function setUp(): void
{
}
- protected function _after(): void
+ protected function tearDown(): void
{
}
diff --git a/tests/unit/Grav/Common/Data/BlueprintTest.php b/tests/unit/Grav/Common/Data/BlueprintTest.php
index ff6ccf56e..54a2879e1 100644
--- a/tests/unit/Grav/Common/Data/BlueprintTest.php
+++ b/tests/unit/Grav/Common/Data/BlueprintTest.php
@@ -7,7 +7,7 @@ use Grav\Common\Grav;
/**
* Class InstallCommandTest
*/
-class BlueprintTest extends \Codeception\TestCase\Test
+class BlueprintTest extends \PHPUnit\Framework\TestCase
{
/**
*/
diff --git a/tests/unit/Grav/Common/GPM/GPMTest.php b/tests/unit/Grav/Common/GPM/GPMTest.php
index 684ed3dd1..6968021e1 100644
--- a/tests/unit/Grav/Common/GPM/GPMTest.php
+++ b/tests/unit/Grav/Common/GPM/GPMTest.php
@@ -35,7 +35,7 @@ class GpmStub extends GPM
/**
* Class InstallCommandTest
*/
-class GpmTest extends \Codeception\TestCase\Test
+class GpmTest extends \PHPUnit\Framework\TestCase
{
/** @var Grav $grav */
protected $grav;
@@ -43,13 +43,15 @@ class GpmTest extends \Codeception\TestCase\Test
/** @var GpmStub */
protected $gpm;
- protected function _before(): void
+ protected function setUp(): void
{
- $this->grav = Fixtures::get('grav');
+ parent::setUp();
+
+$this->grav = Fixtures::get('grav');
$this->gpm = new GpmStub();
}
- protected function _after(): void
+ protected function tearDown(): void
{
}
diff --git a/tests/unit/Grav/Common/Helpers/ExcerptsTest.php b/tests/unit/Grav/Common/Helpers/ExcerptsTest.php
index 8cb473c31..950f21304 100644
--- a/tests/unit/Grav/Common/Helpers/ExcerptsTest.php
+++ b/tests/unit/Grav/Common/Helpers/ExcerptsTest.php
@@ -13,7 +13,7 @@ use RocketTheme\Toolbox\ResourceLocator\UniformResourceLocator;
/**
* Class ExcerptsTest
*/
-class ExcerptsTest extends \Codeception\TestCase\Test
+class ExcerptsTest extends \PHPUnit\Framework\TestCase
{
/** @var Parsedown $parsedown */
protected $parsedown;
@@ -38,8 +38,9 @@ class ExcerptsTest extends \Codeception\TestCase\Test
protected $old_home;
- protected function _before(): void
+ protected function setUp(): void
{
+ parent::setUp();
$grav = Fixtures::get('grav');
$this->grav = $grav();
$this->pages = $this->grav['pages'];
@@ -70,7 +71,7 @@ class ExcerptsTest extends \Codeception\TestCase\Test
$this->uri->initializeWithURL('http://testing.dev/item2/item2-2')->init();
}
- protected function _after(): void
+ protected function tearDown(): void
{
$this->config->set('system.home.alias', $this->old_home);
}
@@ -78,11 +79,11 @@ class ExcerptsTest extends \Codeception\TestCase\Test
public function testProcessImageHtml(): void
{
- self::assertRegexp(
+ self::assertMatchesRegularExpression(
'|
|',
Excerpts::processImageHtml('
', $this->page)
);
- self::assertRegexp(
+ self::assertMatchesRegularExpression(
'|
|',
Excerpts::processImageHtml('
', $this->page)
);
diff --git a/tests/unit/Grav/Common/InflectorTest.php b/tests/unit/Grav/Common/InflectorTest.php
index 63e6e9961..4c914474e 100644
--- a/tests/unit/Grav/Common/InflectorTest.php
+++ b/tests/unit/Grav/Common/InflectorTest.php
@@ -8,7 +8,7 @@ use Grav\Common\Utils;
/**
* Class InflectorTest
*/
-class InflectorTest extends \Codeception\TestCase\Test
+class InflectorTest extends \PHPUnit\Framework\TestCase
{
/** @var Grav $grav */
protected $grav;
@@ -16,14 +16,15 @@ class InflectorTest extends \Codeception\TestCase\Test
/** @var Inflector $uri */
protected $inflector;
- protected function _before(): void
+ protected function setUp(): void
{
+ parent::setUp();
$grav = Fixtures::get('grav');
$this->grav = $grav();
$this->inflector = $this->grav['inflector'];
}
- protected function _after(): void
+ protected function tearDown(): void
{
}
diff --git a/tests/unit/Grav/Common/Language/LanguageCodesTest.php b/tests/unit/Grav/Common/Language/LanguageCodesTest.php
index 3450c88ea..e163942d0 100644
--- a/tests/unit/Grav/Common/Language/LanguageCodesTest.php
+++ b/tests/unit/Grav/Common/Language/LanguageCodesTest.php
@@ -5,7 +5,7 @@ use Grav\Common\Language\LanguageCodes;
/**
* Class ParsedownTest
*/
-class LanguageCodesTest extends \Codeception\TestCase\Test
+class LanguageCodesTest extends \PHPUnit\Framework\TestCase
{
public function testRtl(): void
{
diff --git a/tests/unit/Grav/Common/Markdown/ParsedownTest.php b/tests/unit/Grav/Common/Markdown/ParsedownTest.php
index 5706389b9..4503c4d91 100644
--- a/tests/unit/Grav/Common/Markdown/ParsedownTest.php
+++ b/tests/unit/Grav/Common/Markdown/ParsedownTest.php
@@ -13,7 +13,7 @@ use RocketTheme\Toolbox\ResourceLocator\UniformResourceLocator;
/**
* Class ParsedownTest
*/
-class ParsedownTest extends \Codeception\TestCase\Test
+class ParsedownTest extends \PHPUnit\Framework\TestCase
{
/** @var Parsedown $parsedown */
protected $parsedown;
@@ -35,8 +35,9 @@ class ParsedownTest extends \Codeception\TestCase\Test
protected $old_home;
- protected function _before(): void
+ protected function setUp(): void
{
+ parent::setUp();
$grav = Fixtures::get('grav');
$this->grav = $grav();
$this->pages = $this->grav['pages'];
@@ -72,7 +73,7 @@ class ParsedownTest extends \Codeception\TestCase\Test
$this->parsedown = new Parsedown($excerpts);
}
- protected function _after(): void
+ protected function tearDown(): void
{
$this->config->set('system.home.alias', $this->old_home);
}
@@ -88,7 +89,7 @@ class ParsedownTest extends \Codeception\TestCase\Test
'

<\/p>|',
$this->parsedown->text('')
);
@@ -99,11 +100,11 @@ class ParsedownTest extends \Codeception\TestCase\Test
'

<\/p>|',
$this->parsedown->text('')
);
- self::assertRegexp(
+ self::assertMatchesRegularExpression(
'|
<\/p>|',
$this->parsedown->text('')
);
@@ -130,7 +131,7 @@ class ParsedownTest extends \Codeception\TestCase\Test
$this->config->set('system.images.cache_all', false);
$this->uri->initializeWithUrlAndRootPath('http://testing.dev/subdir/item2/item2-2', '/subdir')->init();
- self::assertRegexp(
+ self::assertMatchesRegularExpression(
'|
<\/p>|',
$this->parsedown->text('')
);
@@ -138,7 +139,7 @@ class ParsedownTest extends \Codeception\TestCase\Test
'

<\/p>|',
$this->parsedown->text('')
);
@@ -161,11 +162,11 @@ class ParsedownTest extends \Codeception\TestCase\Test
'

<\/p>|',
$this->parsedown->text('')
);
- self::assertRegexp(
+ self::assertMatchesRegularExpression(
'|
<\/p>|',
$this->parsedown->text('')
);
@@ -188,11 +189,11 @@ class ParsedownTest extends \Codeception\TestCase\Test
'

<\/p>|',
$this->parsedown->text('')
);
- self::assertRegexp(
+ self::assertMatchesRegularExpression(
'|
<\/p>|',
$this->parsedown->text('')
);
@@ -320,7 +321,7 @@ class ParsedownTest extends \Codeception\TestCase\Test
$this->parsedown->text('')
);
- self::assertRegExp(
+ self::assertMatchesRegularExpression(
'/width="400" height="200"/',
$this->parsedown->text('')
);
@@ -328,33 +329,33 @@ class ParsedownTest extends \Codeception\TestCase\Test
$this->config->set('system.images.cls.retina_scale', 2);
- self::assertRegExp(
+ self::assertMatchesRegularExpression(
'/width="400" height="200"/',
$this->parsedown->text('')
);
$this->config->set('system.images.cls.retina_scale', 4);
- self::assertRegExp(
+ self::assertMatchesRegularExpression(
'/width="200" height="100"/',
$this->parsedown->text('')
);
- self::assertRegExp(
+ self::assertMatchesRegularExpression(
'/width="266" height="133"/',
$this->parsedown->text('')
);
$this->config->set('system.images.cls.aspect_ratio', true);
- self::assertRegExp(
+ self::assertMatchesRegularExpression(
'/style="--aspect-ratio: 800\/400;"/',
$this->parsedown->text('')
);
$this->config->set('system.images.cls.aspect_ratio', false);
- self::assertRegExp(
+ self::assertMatchesRegularExpression(
'/style="--aspect-ratio: 800\/400;"/',
$this->parsedown->text('')
);
@@ -383,11 +384,11 @@ class ParsedownTest extends \Codeception\TestCase\Test
'

<\/p>|',
$this->parsedown->text('')
);
- self::assertRegexp(
+ self::assertMatchesRegularExpression(
'|
<\/p>|',
$this->parsedown->text('')
);
@@ -416,11 +417,11 @@ class ParsedownTest extends \Codeception\TestCase\Test
'

<\/p>|',
$this->parsedown->text('')
);
- self::assertRegexp(
+ self::assertMatchesRegularExpression(
'|
<\/p>|',
$this->parsedown->text('')
);
diff --git a/tests/unit/Grav/Common/Page/PagesTest.php b/tests/unit/Grav/Common/Page/PagesTest.php
index edff75bc8..74f816ad5 100644
--- a/tests/unit/Grav/Common/Page/PagesTest.php
+++ b/tests/unit/Grav/Common/Page/PagesTest.php
@@ -10,7 +10,7 @@ use RocketTheme\Toolbox\ResourceLocator\UniformResourceLocator;
/**
* Class PagesTest
*/
-class PagesTest extends \Codeception\TestCase\Test
+class PagesTest extends \PHPUnit\Framework\TestCase
{
/** @var Grav $grav */
protected $grav;
@@ -21,8 +21,9 @@ class PagesTest extends \Codeception\TestCase\Test
/** @var PageInterface $root_page */
protected $root_page;
- protected function _before(): void
+ protected function setUp(): void
{
+ parent::setUp();
$grav = Fixtures::get('grav');
$this->grav = $grav();
$this->pages = $this->grav['pages'];
diff --git a/tests/unit/Grav/Common/Twig/Extensions/GravExtensionTest.php b/tests/unit/Grav/Common/Twig/Extensions/GravExtensionTest.php
index 2adb02378..d5370b1f4 100644
--- a/tests/unit/Grav/Common/Twig/Extensions/GravExtensionTest.php
+++ b/tests/unit/Grav/Common/Twig/Extensions/GravExtensionTest.php
@@ -7,7 +7,7 @@ use Grav\Common\Twig\Extension\GravExtension;
/**
* Class GravExtensionTest
*/
-class GravExtensionTest extends \Codeception\TestCase\Test
+class GravExtensionTest extends \PHPUnit\Framework\TestCase
{
/** @var Grav $grav */
protected $grav;
@@ -15,8 +15,9 @@ class GravExtensionTest extends \Codeception\TestCase\Test
/** @var GravExtension $twig_ext */
protected $twig_ext;
- protected function _before(): void
+ protected function setUp(): void
{
+ parent::setUp();
$this->grav = Fixtures::get('grav');
$this->twig_ext = new GravExtension();
}
diff --git a/tests/unit/Grav/Common/UriTest.php b/tests/unit/Grav/Common/UriTest.php
index c36ce52da..8f236dc40 100644
--- a/tests/unit/Grav/Common/UriTest.php
+++ b/tests/unit/Grav/Common/UriTest.php
@@ -9,7 +9,7 @@ use Grav\Common\Utils;
/**
* Class UriTest
*/
-class UriTest extends \Codeception\TestCase\Test
+class UriTest extends \PHPUnit\Framework\TestCase
{
/** @var Grav $grav */
protected $grav;
@@ -858,15 +858,16 @@ class UriTest extends \Codeception\TestCase\Test
],
];
- protected function _before(): void
+ protected function setUp(): void
{
+ parent::setUp();
$grav = Fixtures::get('grav');
$this->grav = $grav();
$this->uri = $this->grav['uri'];
$this->config = $this->grav['config'];
}
- protected function _after(): void
+ protected function tearDown(): void
{
}
diff --git a/tests/unit/Grav/Common/UtilsTest.php b/tests/unit/Grav/Common/UtilsTest.php
index 9a29ad7e2..05b7cbd8c 100644
--- a/tests/unit/Grav/Common/UtilsTest.php
+++ b/tests/unit/Grav/Common/UtilsTest.php
@@ -8,7 +8,7 @@ use Grav\Common\Utils;
/**
* Class UtilsTest
*/
-class UtilsTest extends \Codeception\TestCase\Test
+class UtilsTest extends \PHPUnit\Framework\TestCase
{
/** @var Grav $grav */
protected $grav;
@@ -16,14 +16,15 @@ class UtilsTest extends \Codeception\TestCase\Test
/** @var Uri $uri */
protected $uri;
- protected function _before(): void
+ protected function setUp(): void
{
+ parent::setUp();
$grav = Fixtures::get('grav');
$this->grav = $grav();
$this->uri = $this->grav['uri'];
}
- protected function _after(): void
+ protected function tearDown(): void
{
}
diff --git a/tests/unit/Grav/Console/Gpm/InstallCommandTest.php b/tests/unit/Grav/Console/Gpm/InstallCommandTest.php
index 94aef1ac8..43dd5a49f 100644
--- a/tests/unit/Grav/Console/Gpm/InstallCommandTest.php
+++ b/tests/unit/Grav/Console/Gpm/InstallCommandTest.php
@@ -7,7 +7,7 @@ use Grav\Console\Gpm\InstallCommand;
/**
* Class InstallCommandTest
*/
-class InstallCommandTest extends \Codeception\TestCase\Test
+class InstallCommandTest extends \PHPUnit\Framework\TestCase
{
/** @var Grav $grav */
protected $grav;
@@ -16,13 +16,14 @@ class InstallCommandTest extends \Codeception\TestCase\Test
protected $installCommand;
- protected function _before(): void
+ protected function setUp(): void
{
+ parent::setUp();
$this->grav = Fixtures::get('grav');
$this->installCommand = new InstallCommand();
}
- protected function _after(): void
+ protected function tearDown(): void
{
}
}
diff --git a/tests/unit/Grav/Framework/File/Formatter/CsvFormatterTest.php b/tests/unit/Grav/Framework/File/Formatter/CsvFormatterTest.php
index 7bff4e25f..cce1d20fc 100644
--- a/tests/unit/Grav/Framework/File/Formatter/CsvFormatterTest.php
+++ b/tests/unit/Grav/Framework/File/Formatter/CsvFormatterTest.php
@@ -5,7 +5,7 @@ use Grav\Framework\File\Formatter\CsvFormatter;
/**
* Class CsvFormatterTest
*/
-class CsvFormatterTest extends \Codeception\TestCase\Test
+class CsvFormatterTest extends \PHPUnit\Framework\TestCase
{
public function testEncodeWithAssocColumns(): void
{
diff --git a/tests/unit/Grav/Framework/Filesystem/FilesystemTest.php b/tests/unit/Grav/Framework/Filesystem/FilesystemTest.php
index 2aea40ca4..eb9eab0f5 100644
--- a/tests/unit/Grav/Framework/Filesystem/FilesystemTest.php
+++ b/tests/unit/Grav/Framework/Filesystem/FilesystemTest.php
@@ -5,7 +5,7 @@ use Grav\Framework\Filesystem\Filesystem;
/**
* Class FilesystemTest
*/
-class FilesystemTest extends \Codeception\TestCase\Test
+class FilesystemTest extends \PHPUnit\Framework\TestCase
{
protected $class;
@@ -280,12 +280,14 @@ class FilesystemTest extends \Codeception\TestCase\Test
],
];
- protected function _before(): void
+ protected function setUp(): void
{
- $this->class = Filesystem::getInstance();
+ parent::setUp();
+
+$this->class = Filesystem::getInstance();
}
- protected function _after(): void
+ protected function tearDown(): void
{
unset($this->class);
}