Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tobias-93 committed Dec 27, 2024
1 parent 65b4693 commit b09f13c
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/phpunit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
php: [ '8.1', '8.2', '8.3', '8.4' ]
php: [ '8.2', '8.3', '8.4' ]
name: On PHP ${{ matrix.php }}

steps:
Expand Down
2 changes: 1 addition & 1 deletion ClassLoader/AdmingeneratedClassLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public function register(string $cacheDir): void
return;
}
$this->basePath = $cacheDir;
spl_autoload_register(array($this, 'loadClass'), true);
spl_autoload_register([$this, 'loadClass'], true);
self::$initialized = true;
}

Expand Down
7 changes: 3 additions & 4 deletions Tests/ClassLoader/AdmingeneratedClassLoaderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@

use Admingenerator\GeneratorBundle\Tests\TestCase;
use Admingenerator\GeneratorBundle\ClassLoader\AdmingeneratedClassLoader;
use PHPUnit\Framework\Attributes\DataProvider;

class AdmingeneratedClassLoaderTest extends TestCase
{
/**
* @dataProvider getLoadClassTests
*/
#[DataProvider('getLoadClassTests')]
public function testLoadClass($className, $testClassName, $message): void
{
$loader = new AdmingeneratedClassLoader();
Expand All @@ -18,7 +17,7 @@ public function testLoadClass($className, $testClassName, $message): void
$this->assertTrue(class_exists($className), $message);
}

public function getLoadClassTests(): array
public static function getLoadClassTests(): array
{
return [
[
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* new Twig environment in order to assert a template and its rendered version
* are coherent.
*/
abstract class BaseExtensionTest extends TestCase
abstract class AbstractExtensionTestCase extends TestCase
{
/**
* Variables used for templates
Expand Down
2 changes: 1 addition & 1 deletion Tests/Twig/Extension/EchoExtensionTest.php
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
/**
* This class tests the Admingenerator\GeneratorBundle\Twig\Extension\EchoExtension
*/
class EchoExtensionTest extends BaseExtensionTest
class EchoExtensionTest extends AbstractExtensionTestCase
{
protected bool $useJms = false;

Expand Down
12 changes: 6 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
}
],
"require": {
"php": "^8.1",
"php": "^8.2",
"doctrine/common": "~2.2||~3.0",
"doctrine/inflector": "~1.4||~2.0",
"symfony/cache": ">=5.4,<7.0",
Expand All @@ -44,17 +44,17 @@
"symfony/twig-bundle": ">=5.4,<7.0",
"symfony/validator": ">=5.4,<7.0",
"symfony/yaml": ">=5.4,<7.0",
"symfony2admingenerator/twig-generator": "^2.0.1",
"symfony2admingenerator/twig-generator": "^2.0.3",
"twig/twig": "^2.15.3||^3.4.3",
"babdev/pagerfanta-bundle": "~2.0||~3.0||~4.0",
"babdev/pagerfanta-bundle": "~4.0",
"pagerfanta/pagerfanta": "~3.0||~4.0",
"psr/log": "~1.0||~2.0||~3.0"
},
"require-dev": {
"doctrine/dbal": ">=3.5.3",
"doctrine/orm": ">=2.14.1",
"doctrine/dbal": ">=4.2.1",
"doctrine/orm": ">=2.20.1",
"symfony/maker-bundle": "~1.0",
"phpunit/phpunit": "~9"
"phpunit/phpunit": ">=11.5.2"
},
"suggest": {
"symfony2admingenerator/form-extensions-bundle": "Symfony form extensions",
Expand Down

0 comments on commit b09f13c

Please sign in to comment.