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

Prep for individual testing #839

Open
wants to merge 5 commits into
base: 7.0.x
Choose a base branch
from
Open
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 .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ jobs:
name: "PHPUnit"
uses: "doctrine/.github/.github/workflows/continuous-integration.yml@2.1.0"
with:
php-versions: '["8.0", "8.1", "8.2", "8.3"]'
php-versions: '["8.1", "8.2", "8.3"]'
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
},
"require-dev": {
"doctrine/coding-standard": "^12.0",
"laminas/laminas-cache-storage-adapter-memory": "^3.0",
"php-parallel-lint/php-parallel-lint": "^1.4",
"phpstan/phpstan": "^1.11",
"phpunit/phpunit": "^11.3"
Expand Down
2 changes: 1 addition & 1 deletion src/Service/Authentication/AdapterFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
*/
final class AdapterFactory extends AbstractFactory
{
/**

Check failure on line 21 in src/Service/Authentication/AdapterFactory.php

View workflow job for this annotation

GitHub Actions / Coding Standards / Coding Standards (8.3)

Useless documentation comment with @inheritdoc.
* {@inheritDoc}
*/
public function __invoke(ContainerInterface $container, $requestedName, array|null $options = null)
public function __invoke(ContainerInterface $container, string $requestedName, array|null $options = null): mixed
{
$options = $this->getOptions($container, 'authentication');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
*/
final class AuthenticationServiceFactory extends AbstractFactory
{
/**

Check failure on line 17 in src/Service/Authentication/AuthenticationServiceFactory.php

View workflow job for this annotation

GitHub Actions / Coding Standards / Coding Standards (8.3)

Useless documentation comment with @inheritdoc.
* {@inheritDoc}
*/
public function __invoke(ContainerInterface $container, $requestedName, array|null $options = null)
public function __invoke(ContainerInterface $container, string $requestedName, array|null $options = null): mixed
{
return new AuthenticationService(
$container->get('doctrine.authenticationstorage.' . $this->getName()),
Expand Down
2 changes: 1 addition & 1 deletion src/Service/Authentication/StorageFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
*/
final class StorageFactory extends AbstractFactory
{
/**

Check failure on line 21 in src/Service/Authentication/StorageFactory.php

View workflow job for this annotation

GitHub Actions / Coding Standards / Coding Standards (8.3)

Useless documentation comment with @inheritdoc.
* {@inheritDoc}
*/
public function __invoke(ContainerInterface $container, $requestedName, array|null $options = null)
public function __invoke(ContainerInterface $container, string $requestedName, array|null $options = null): mixed
{
$options = $this->getOptions($container, 'authentication');

Expand Down
2 changes: 1 addition & 1 deletion src/Service/CacheFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ final class CacheFactory extends AbstractFactory
*
* @throws RuntimeException
*/
public function __invoke(ContainerInterface $container, $requestedName, array|null $options = null)
public function __invoke(ContainerInterface $container, string $requestedName, array|null $options = null): mixed
{
$options = $this->getOptions($container, 'cache');

Expand Down
2 changes: 1 addition & 1 deletion src/Service/DriverFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ final class DriverFactory extends AbstractFactory
*
* @return MappingDriver
*/
public function __invoke(ContainerInterface $container, $requestedName, array|null $options = null)
public function __invoke(ContainerInterface $container, string $requestedName, array|null $options = null): mixed
{
$options = $this->getOptions($container, 'driver');

Expand Down
2 changes: 1 addition & 1 deletion src/Service/EventManagerFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@
*/
final class EventManagerFactory extends AbstractFactory
{
/**

Check failure on line 25 in src/Service/EventManagerFactory.php

View workflow job for this annotation

GitHub Actions / Coding Standards / Coding Standards (8.3)

Useless documentation comment with @inheritdoc.
* {@inheritDoc}
*/
public function __invoke(ContainerInterface $container, $requestedName, array|null $options = null)
public function __invoke(ContainerInterface $container, string $requestedName, array|null $options = null): mixed
{
$options = $this->getOptions($container, 'eventmanager');

Expand Down
5 changes: 1 addition & 4 deletions src/Validator/Service/NoObjectExistsFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,7 @@ final class NoObjectExistsFactory extends AbstractValidatorFactory
{
protected string $validatorClass = NoObjectExists::class;

/**
* {@inheritDoc}
*/
public function __invoke(ContainerInterface $container, $requestedName, array|null $options = null)
public function __invoke(ContainerInterface $container, string $requestedName, array|null $options = null): mixed
{
$repository = $this->getRepository($container, $options);

Expand Down
5 changes: 1 addition & 4 deletions src/Validator/Service/ObjectExistsFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,7 @@ final class ObjectExistsFactory extends AbstractValidatorFactory
{
protected string $validatorClass = ObjectExists::class;

/**
* {@inheritDoc}
*/
public function __invoke(ContainerInterface $container, $requestedName, array|null $options = null)
public function __invoke(ContainerInterface $container, string $requestedName, array|null $options = null): mixed
{
$repository = $this->getRepository($container, $options);

Expand Down
5 changes: 1 addition & 4 deletions src/Validator/Service/UniqueObjectFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,7 @@ final class UniqueObjectFactory extends AbstractValidatorFactory
{
protected string $validatorClass = UniqueObject::class;

/**
* {@inheritDoc}
*/
public function __invoke(ContainerInterface $container, $requestedName, array|null $options = null)
public function __invoke(ContainerInterface $container, string $requestedName, array|null $options = null): mixed
{
$useContext = isset($options['use_context']) ? (bool) $options['use_context'] : false;

Expand Down
4 changes: 2 additions & 2 deletions tests/Cache/DoctrineCacheStorageTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
use Laminas\Cache\Storage\Capabilities;
use Laminas\Cache\Storage\StorageInterface;
use Laminas\Stdlib\ErrorHandler;
use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\Test;
use PHPUnit\Framework\TestCase;
use stdClass;
Expand All @@ -32,9 +33,8 @@

/**
* Tests for the cache bridge
*
* @covers \DoctrineModule\Cache\DoctrineCacheStorage
*/
#[CoversClass(DoctrineCacheStorage::class)]
class DoctrineCacheStorageTest extends TestCase
{
protected AdapterOptions $options;
Expand Down
4 changes: 2 additions & 2 deletions tests/Form/Element/ObjectMultiCheckboxTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
use DoctrineModule\Form\Element\ObjectMultiCheckbox;
use DoctrineModule\Form\Element\Proxy;
use Laminas\Form\Element;
use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\Test;

/**
* Tests for the ObjectMultiCheckbox element
*
* @covers \DoctrineModule\Form\Element\ObjectMultiCheckbox
*/
#[CoversClass(ObjectMultiCheckbox::class)]
class ObjectMultiCheckboxTest extends ProxyAwareElementTestCase
{
/** @var ObjectMultiCheckbox */
Expand Down
4 changes: 2 additions & 2 deletions tests/Form/Element/ObjectRadioTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
use DoctrineModule\Form\Element\ObjectRadio;
use DoctrineModule\Form\Element\Proxy;
use Laminas\Form\Element;
use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\Test;

/**
* Tests for the ObjectRadio element
*
* @covers \DoctrineModule\Form\Element\ObjectRadio
*/
#[CoversClass(ObjectRadio::class)]
class ObjectRadioTest extends ProxyAwareElementTestCase
{
/** @var ObjectRadio */
Expand Down
4 changes: 2 additions & 2 deletions tests/Form/Element/ObjectSelectTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
use DoctrineModule\Form\Element\ObjectSelect;
use DoctrineModule\Form\Element\Proxy;
use Laminas\Form\Element;
use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\Test;

/**
* Tests for the ObjectSelect element
*
* @covers \DoctrineModule\Form\Element\ObjectSelect
*/
#[CoversClass(ObjectSelect::class)]
class ObjectSelectTest extends ProxyAwareElementTestCase
{
/** @var ObjectSelect */
Expand Down
4 changes: 2 additions & 2 deletions tests/Form/Element/ProxyTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
use DoctrineModule\Form\Element\Exception\InvalidRepositoryResultException;
use DoctrineModule\Form\Element\Proxy;
use DoctrineModuleTest\Form\Element\TestAsset\FormObject;
use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\Test;
use PHPUnit\Framework\MockObject\MockObject;
use PHPUnit\Framework\TestCase;
Expand All @@ -24,9 +25,8 @@

/**
* Tests for the Collection pagination adapter
*
* @covers \DoctrineModule\Form\Element\Proxy
*/
#[CoversClass(Proxy::class)]
class ProxyTest extends TestCase
{
/** @var MockObject&ClassMetadata */
Expand Down
8 changes: 6 additions & 2 deletions tests/ModuleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
use Laminas\Mvc\Application;
use Laminas\Mvc\MvcEvent;
use Laminas\ServiceManager\ServiceManager;
use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\Test;
use PHPUnit\Framework\MockObject\MockObject;
use PHPUnit\Framework\TestCase;
Expand All @@ -16,7 +17,7 @@
use function serialize;
use function unserialize;

/** @covers \DoctrineModule\Module */
#[CoversClass(Module::class)]
class ModuleTest extends TestCase
{
/** @var MockObject&Application */
Expand Down Expand Up @@ -60,7 +61,10 @@ protected function setUp(): void
->will($this->returnValue($this->application));
}

/** @covers \DoctrineModule\Module::getConfig */
/**
* FIXME: attributes for CoversFunction needed
* old: covers \DoctrineModule\Module::getConfig
*/
#[Test]
public function testGetConfig(): void
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
use DoctrineModule\Validator\ObjectExists;
use Laminas\Validator\Exception\InvalidArgumentException;
use Laminas\Validator\Exception\RuntimeException;
use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\Test;
use PHPUnit\Framework\TestCase as BaseTestCase;
use stdClass;
Expand All @@ -16,9 +17,8 @@

/**
* Tests for the ObjectExists validator
*
* @covers \DoctrineModule\Validator\ObjectExists
*/
#[CoversClass(ObjectExists::class)]
class ObjectExistsTest extends BaseTestCase
{
#[Test]
Expand Down
7 changes: 4 additions & 3 deletions tests/Validator/Service/NoObjectExistsFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,17 @@
use DoctrineModule\Validator\Service\NoObjectExistsFactory;
use DoctrineModuleTest\Validator\TestAsset\DummyClass;
use Laminas\ServiceManager\ServiceLocatorInterface;
use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Test;
use PHPUnit\Framework\TestCase;
use Psr\Container\ContainerInterface;

/**
* Generated by PHPUnit_SkeletonGenerator on 2017-09-04 at 11:12:27.
*
* @coversDefaultClass NoObjectExistsFactory
* @group validator
*/
#[CoversClass(NoObjectExistsFactory::class)]
#[Group('validator')]
class NoObjectExistsFactoryTest extends TestCase
{
private NoObjectExistsFactory $object;
Expand Down
7 changes: 4 additions & 3 deletions tests/Validator/Service/ObjectExistsFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,17 @@
use DoctrineModule\Validator\ObjectExists;
use DoctrineModule\Validator\Service\ObjectExistsFactory;
use DoctrineModuleTest\Validator\TestAsset\DummyClass;
use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Test;
use PHPUnit\Framework\TestCase;
use Psr\Container\ContainerInterface;

/**
* Generated by PHPUnit_SkeletonGenerator on 2017-09-04 at 11:55:36.
*
* @coversDefaultClass ObjectExistsFactory
* @group validator
*/
#[CoversClass(ObjectExistsFactory::class)]
#[Group('validator')]
class ObjectExistsFactoryTest extends TestCase
{
protected ObjectExistsFactory $object;
Expand Down
7 changes: 4 additions & 3 deletions tests/Validator/Service/UniqueObjectFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,17 @@
use DoctrineModule\Validator\Service\UniqueObjectFactory;
use DoctrineModule\Validator\UniqueObject;
use DoctrineModuleTest\Validator\TestAsset\DummyClass;
use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Test;
use PHPUnit\Framework\TestCase;
use Psr\Container\ContainerInterface;

/**
* Generated by PHPUnit_SkeletonGenerator on 2017-09-04 at 11:57:37.
*
* @coversDefaultClass UniqueObjectFactory
* @group validator
*/
#[CoversClass(UniqueObjectFactory::class)]
#[Group('validator')]
class UniqueObjectFactoryTest extends TestCase
{
private UniqueObjectFactory $object;
Expand Down
Loading