Skip to content

Commit

Permalink
Remove unnecessary test values
Browse files Browse the repository at this point in the history
  • Loading branch information
danon committed Dec 4, 2022
1 parent f658903 commit db00bab
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 68 deletions.
3 changes: 1 addition & 2 deletions test/DataProviders.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
namespace Test;

use Test\Utils\Classes\ClassWithToString;
use Test\Utils\Values\Definitions;
use TRegx\CleanRegex\Internal\Definition;

class DataProviders
Expand Down Expand Up @@ -63,7 +62,7 @@ private static function typesMap(): array
'resource' => [self::getResource(), 'resource'],
'stdClass' => [new \stdClass(), 'stdClass'],
'__toString' => [new ClassWithToString('string'), 'Test\Utils\Classes\ClassWithToString'],
'class' => [Definitions::pcre('//'), Definition::class],
'class' => [new Definition('//'), Definition::class],
'function' => [function () {
}, 'Closure']
];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
namespace Test\Unit\CleanRegex\Internal\Model\Match;

use PHPUnit\Framework\TestCase;
use Test\Utils\Values\Definitions;
use TRegx\CleanRegex\Internal\Definition;
use TRegx\CleanRegex\Internal\GroupKey\GroupName;
use TRegx\CleanRegex\Internal\Model\LightweightGroupAware;

Expand All @@ -17,7 +17,7 @@ class LightweightGroupAwareTest extends TestCase
public function shouldGetGroupKeys()
{
// given
$groupAware = new LightweightGroupAware(Definitions::pcre('/(?<group>)/'));
$groupAware = new LightweightGroupAware(new Definition('/(?<group>)/'));

// when
$keys = $groupAware->getGroupKeys();
Expand All @@ -35,7 +35,7 @@ public function shouldGetGroupKeys()
public function shouldVerify(string $pattern, bool $expected)
{
// given
$groupAware = new LightweightGroupAware(Definitions::pcre($pattern));
$groupAware = new LightweightGroupAware(new Definition($pattern));

// when
$hasGroup = $groupAware->hasGroup(new GroupName('group'));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
namespace Test\Unit\CleanRegex\Internal\Prepared\Parser;

use PHPUnit\Framework\TestCase;
use Test\Utils\Values\StandardSubpatternFlags;
use Test\Utils\Prepared\StandardSubpatternFlags;
use TRegx\CleanRegex\Internal\Prepared\Parser\Entity\GroupClose;
use TRegx\CleanRegex\Internal\Prepared\Parser\Entity\GroupOpenFlags;
use TRegx\CleanRegex\Internal\Prepared\Parser\EntitySequence;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
namespace Test\Unit\CleanRegex\Internal\Prepared\Parser;

use PHPUnit\Framework\TestCase;
use Test\Utils\Values\StandardSubpatternFlags;
use Test\Utils\Prepared\StandardSubpatternFlags;
use TRegx\CleanRegex\Internal\Prepared\Parser\FlagStack;

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
namespace Test\Utils\Values;
namespace Test\Utils\Prepared;

use TRegx\CleanRegex\Internal\Flags;
use TRegx\CleanRegex\Internal\Prepared\Parser\SubpatternFlags;
Expand Down
39 changes: 0 additions & 39 deletions test/Utils/Values/Definitions.php

This file was deleted.

21 changes: 0 additions & 21 deletions test/Utils/Values/FocusGroupPairs.php

This file was deleted.

0 comments on commit db00bab

Please sign in to comment.