Skip to content

Commit

Permalink
fucking hell
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshuaEstes committed Jul 30, 2024
1 parent 14d4e72 commit 6159896
Show file tree
Hide file tree
Showing 26 changed files with 98 additions and 186 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,14 @@
namespace SonsOfPHP\Component\FeatureToggle\Tests\Toggle;

use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\UsesClass;
use PHPUnit\Framework\TestCase;
use SonsOfPHP\Component\FeatureToggle\Toggle\AffirmativeToggle;
use SonsOfPHP\Component\FeatureToggle\Toggle\MockToggle;
use SonsOfPHP\Contract\FeatureToggle\ToggleInterface;

/**
*
* @uses \SonsOfPHP\Component\FeatureToggle\Toggle\AffirmativeToggle
* @uses \SonsOfPHP\Component\FeatureToggle\Context
* @uses \SonsOfPHP\Component\FeatureToggle\Toggle\MockToggle
* @coversNothing
*/
#[CoversClass(AffirmativeToggle::class)]
#[UsesClass(MockToggle::class)]
final class AffirmativeToggleTest extends TestCase
{
public function testItHasTheCorrectInterface(): void
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,14 @@
namespace SonsOfPHP\Component\FeatureToggle\Tests\Toggle;

use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\UsesClass;
use PHPUnit\Framework\TestCase;
use SonsOfPHP\Component\FeatureToggle\Toggle\ChainToggle;
use SonsOfPHP\Component\FeatureToggle\Toggle\MockToggle;
use SonsOfPHP\Contract\FeatureToggle\ToggleInterface;

/**
*
* @uses \SonsOfPHP\Component\FeatureToggle\Toggle\ChainToggle
* @uses \SonsOfPHP\Component\FeatureToggle\Context
* @uses \SonsOfPHP\Component\FeatureToggle\Toggle\MockToggle
* @coversNothing
*/
#[CoversClass(ChainToggle::class)]
#[UsesClass(MockToggle::class)]
final class ChainToggleTest extends TestCase
{
public function testItHasTheCorrectInterface(): void
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
namespace SonsOfPHP\Component\Filesystem\Tests\Adapter;

use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\UsesClass;
use PHPUnit\Framework\TestCase;
use SonsOfPHP\Component\Filesystem\Adapter\AdapterInterface;
use SonsOfPHP\Component\Filesystem\Adapter\ChainAdapter;
Expand All @@ -14,13 +15,8 @@
use SonsOfPHP\Component\Filesystem\Adapter\MoveAwareInterface;
use SonsOfPHP\Component\Filesystem\Exception\FileNotFoundException;

/**
*
* @uses \SonsOfPHP\Component\Filesystem\Adapter\ChainAdapter
* @uses \SonsOfPHP\Component\Filesystem\Adapter\InMemoryAdapter
* @coversNothing
*/
#[CoversClass(ChainAdapter::class)]
#[UsesClass(InMemoryAdapter::class)]
final class ChainAdapterTest extends TestCase
{
private array $adapters = [];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
namespace SonsOfPHP\Component\Filesystem\Tests\Adapter;

use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\UsesClass;
use PHPUnit\Framework\MockObject;
use PHPUnit\Framework\TestCase;
use SonsOfPHP\Component\Filesystem\Adapter\AdapterInterface;
Expand All @@ -15,13 +16,8 @@
use SonsOfPHP\Component\Filesystem\Adapter\ReadOnlyAdapter;
use SonsOfPHP\Component\Filesystem\Exception\FilesystemException;

/**
*
* @uses \SonsOfPHP\Component\Filesystem\Adapter\ReadOnlyAdapter
* @uses \SonsOfPHP\Component\Filesystem\Adapter\InMemoryAdapter
* @coversNothing
*/
#[CoversClass(ReadOnlyAdapter::class)]
#[UsesClass(InMemoryAdapter::class)]
final class ReadOnlyAdapterTest extends TestCase
{
private AdapterInterface|MockObject $adapter;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
namespace SonsOfPHP\Component\Filesystem\Tests\Adapter;

use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\UsesClass;
use PHPUnit\Framework\TestCase;
use SonsOfPHP\Component\Filesystem\Adapter\AdapterInterface;
use SonsOfPHP\Component\Filesystem\Adapter\CopyAwareInterface;
Expand All @@ -14,13 +15,8 @@
use SonsOfPHP\Component\Filesystem\Adapter\WormAdapter;
use SonsOfPHP\Component\Filesystem\Exception\FilesystemException;

/**
*
* @uses \SonsOfPHP\Component\Filesystem\Adapter\InMemoryAdapter
* @uses \SonsOfPHP\Component\Filesystem\Adapter\WormAdapter
* @coversNothing
*/
#[CoversClass(WormAdapter::class)]
#[UsesClass(InMemoryAdapter::class)]
final class WormAdapterTest extends TestCase
{
private AdapterInterface $adapter;
Expand Down
14 changes: 7 additions & 7 deletions src/SonsOfPHP/Component/Json/Tests/JsonTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@
namespace SonsOfPHP\Component\Json\Tests;

use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\UsesClass;
use PHPUnit\Framework\TestCase;
use SonsOfPHP\Component\Json\AbstractEncoderDecoder;
use SonsOfPHP\Component\Json\Json;
use SonsOfPHP\Component\Json\JsonDecoder;
use SonsOfPHP\Component\Json\JsonEncoder;
use SonsOfPHP\Component\Json\JsonException;

/**
*
* @uses \SonsOfPHP\Component\Json\AbstractEncoderDecoder
* @uses \SonsOfPHP\Component\Json\JsonDecoder
* @uses \SonsOfPHP\Component\Json\JsonEncoder
* @coversNothing
*/
#[CoversClass(Json::class)]
#[UsesClass(AbstractEncoderDecoder::class)]
#[UsesClass(JsonDecoder::class)]
#[UsesClass(JsonEncoder::class)]
final class JsonTest extends TestCase
{
// @todo make JsonEncoderInterface
Expand Down
9 changes: 3 additions & 6 deletions src/SonsOfPHP/Component/Link/Tests/EvolvableLinkTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,15 @@
namespace SonsOfPHP\Component\Link\Tests;

use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\UsesClass;
use PHPUnit\Framework\TestCase;
use Psr\Link\EvolvableLinkInterface;
use SonsOfPHP\Component\Link\EvolvableLink;
use SonsOfPHP\Component\Link\Link;
use Stringable;

/**
*
* @uses \SonsOfPHP\Component\Link\EvolvableLink
* @uses \SonsOfPHP\Component\Link\Link
* @coversNothing
*/
#[CoversClass(EvolvableLink::class)]
#[UsesClass(Link::class)]
final class EvolvableLinkTest extends TestCase
{
public function testItHasTheCorrectInterface(): void
Expand Down
8 changes: 2 additions & 6 deletions src/SonsOfPHP/Component/Link/Tests/LinkProviderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,14 @@
namespace SonsOfPHP\Component\Link\Tests;

use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\UsesClass;
use PHPUnit\Framework\TestCase;
use Psr\Link\LinkProviderInterface;
use SonsOfPHP\Component\Link\Link;
use SonsOfPHP\Component\Link\LinkProvider;

/**
*
* @uses \SonsOfPHP\Component\Link\Link
* @uses \SonsOfPHP\Component\Link\LinkProvider
* @coversNothing
*/
#[CoversClass(LinkProvider::class)]
#[UsesClass(Link::class)]
final class LinkProviderTest extends TestCase
{
public function testItHasTheCorrectInterface(): void
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,17 @@
namespace SonsOfPHP\Component\Logger\Tests\Enricher;

use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\UsesClass;
use PHPUnit\Framework\TestCase;
use SonsOfPHP\Component\Logger\Context;
use SonsOfPHP\Component\Logger\Enricher\GroupIdEnricher;
use SonsOfPHP\Component\Logger\Level;
use SonsOfPHP\Component\Logger\Record;
use SonsOfPHP\Contract\Logger\EnricherInterface;

/**
*
* @uses \SonsOfPHP\Component\Logger\Context
* @uses \SonsOfPHP\Component\Logger\Record
* @coversNothing
*/
#[CoversClass(GroupIdEnricher::class)]
#[UsesClass(Context::class)]
#[UsesClass(Record::class)]
final class GroupIdEnricherTest extends TestCase
{
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,17 @@
namespace SonsOfPHP\Component\Logger\Tests\Enricher;

use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\UsesClass;
use PHPUnit\Framework\TestCase;
use SonsOfPHP\Component\Logger\Context;
use SonsOfPHP\Component\Logger\Enricher\InodeEnricher;
use SonsOfPHP\Component\Logger\Level;
use SonsOfPHP\Component\Logger\Record;
use SonsOfPHP\Contract\Logger\EnricherInterface;

/**
*
* @uses \SonsOfPHP\Component\Logger\Context
* @uses \SonsOfPHP\Component\Logger\Record
* @coversNothing
*/
#[CoversClass(InodeEnricher::class)]
#[UsesClass(Context::class)]
#[UsesClass(Record::class)]
final class InodeEnricherTest extends TestCase
{
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,17 @@
namespace SonsOfPHP\Component\Logger\Tests\Enricher;

use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\UsesClass;
use PHPUnit\Framework\TestCase;
use SonsOfPHP\Component\Logger\Context;
use SonsOfPHP\Component\Logger\Enricher\MaskContextValueEnricher;
use SonsOfPHP\Component\Logger\Level;
use SonsOfPHP\Component\Logger\Record;
use SonsOfPHP\Contract\Logger\EnricherInterface;

/**
*
* @uses \SonsOfPHP\Component\Logger\Enricher\MaskContextValueEnricher
* @uses \SonsOfPHP\Component\Logger\Context
* @uses \SonsOfPHP\Component\Logger\Record
* @coversNothing
*/
#[CoversClass(MaskContextValueEnricher::class)]
#[UsesClass(Context::class)]
#[UsesClass(Record::class)]
final class MaskContextValueEnricherTest extends TestCase
{
public function testItHasTheCorrectInterface(): void
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,19 @@
namespace SonsOfPHP\Component\Logger\Tests\Enricher;

use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\UsesClass;
use PHPUnit\Framework\TestCase;
use SonsOfPHP\Component\Logger\Context;
use SonsOfPHP\Component\Logger\Enricher\NullEnricher;
use SonsOfPHP\Component\Logger\Level;
use SonsOfPHP\Component\Logger\Record;
use SonsOfPHP\Contract\Logger\EnricherInterface;

/**
*
* @uses \SonsOfPHP\Component\Logger\Context
* @uses \SonsOfPHP\Component\Logger\Record
* @coversNothing
*/
#[CoversClass(NullEnricher::class)]
#[UsesClass(Context::class)]
#[UsesClass(Record::class)]
final class NullEnricherTest extends TestCase
{
/**
* @coversNothing
*/
public function testItHasTheCorrectInterface(): void
{
$enricher = new NullEnricher();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,19 @@
namespace SonsOfPHP\Component\Logger\Tests\Enricher;

use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\UsesClass;
use PHPUnit\Framework\TestCase;
use SonsOfPHP\Component\Logger\Context;
use SonsOfPHP\Component\Logger\Enricher\ProcessIdEnricher;
use SonsOfPHP\Component\Logger\Level;
use SonsOfPHP\Component\Logger\Record;
use SonsOfPHP\Contract\Logger\EnricherInterface;

/**
*
* @uses \SonsOfPHP\Component\Logger\Context
* @uses \SonsOfPHP\Component\Logger\Record
* @coversNothing
*/
#[CoversClass(ProcessIdEnricher::class)]
#[UsesClass(Context::class)]
#[UsesClass(Record::class)]
final class ProcessIdEnricherTest extends TestCase
{
/**
* @coversNothing
*/
public function testItHasTheCorrectInterface(): void
{
$enricher = new ProcessIdEnricher();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,17 @@
namespace SonsOfPHP\Component\Logger\Tests\Enricher;

use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\UsesClass;
use PHPUnit\Framework\TestCase;
use SonsOfPHP\Component\Logger\Context;
use SonsOfPHP\Component\Logger\Enricher\ScriptOwnerEnricher;
use SonsOfPHP\Component\Logger\Level;
use SonsOfPHP\Component\Logger\Record;
use SonsOfPHP\Contract\Logger\EnricherInterface;

/**
*
* @uses \SonsOfPHP\Component\Logger\Context
* @uses \SonsOfPHP\Component\Logger\Record
* @coversNothing
*/
#[CoversClass(ScriptOwnerEnricher::class)]
#[UsesClass(Context::class)]
#[UsesClass(Record::class)]
final class ScriptOwnerEnricherTest extends TestCase
{
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,19 @@
namespace SonsOfPHP\Component\Logger\Tests\Enricher;

use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\UsesClass;
use PHPUnit\Framework\TestCase;
use SonsOfPHP\Component\Logger\Context;
use SonsOfPHP\Component\Logger\Enricher\UserIdEnricher;
use SonsOfPHP\Component\Logger\Level;
use SonsOfPHP\Component\Logger\Record;
use SonsOfPHP\Contract\Logger\EnricherInterface;

/**
*
* @uses \SonsOfPHP\Component\Logger\Context
* @uses \SonsOfPHP\Component\Logger\Record
* @coversNothing
*/
#[CoversClass(UserIdEnricher::class)]
#[UsesClass(Context::class)]
#[UsesClass(Record::class)]
final class UserIdEnricherTest extends TestCase
{
/**
* @coversNothing
*/
public function testItHasTheCorrectInterface(): void
{
$enricher = new UserIdEnricher();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,17 @@
namespace SonsOfPHP\Component\Logger\Tests\Filter;

use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\UsesClass;
use PHPUnit\Framework\TestCase;
use SonsOfPHP\Component\Logger\Context;
use SonsOfPHP\Component\Logger\Filter\ChannelFilter;
use SonsOfPHP\Component\Logger\Level;
use SonsOfPHP\Component\Logger\Record;
use SonsOfPHP\Contract\Logger\FilterInterface;

/**
*
* @uses \SonsOfPHP\Component\Logger\Filter\ChannelFilter
* @uses \SonsOfPHP\Component\Logger\Context
* @uses \SonsOfPHP\Component\Logger\Record
* @coversNothing
*/
#[CoversClass(ChannelFilter::class)]
#[UsesClass(Context::class)]
#[UsesClass(Record::class)]
final class ChannelFilterTest extends TestCase
{
public function testItHasTheCorrectInterface(): void
Expand Down
Loading

0 comments on commit 6159896

Please sign in to comment.