diff --git a/composer.json b/composer.json index 084d784..ffe2c57 100644 --- a/composer.json +++ b/composer.json @@ -29,7 +29,7 @@ }, "autoload-dev": { "psr-4": { - "": "stubs/", + "Stubs\\": "stubs/", "Tests\\": "test/", "Tests82\\": "test82/" } diff --git a/stubs/Interfaces/BazAwareInterface.php b/stubs/Interfaces/BazAwareInterface.php index ff55861..49c6c42 100644 --- a/stubs/Interfaces/BazAwareInterface.php +++ b/stubs/Interfaces/BazAwareInterface.php @@ -1,6 +1,6 @@ getMockBuilder(BazAwareInterface::class)->getMock(); }))->getReturnType() ); - $this->assertSame('Interfaces\BazAwareInterface|null', $dnf->dnf()); + $this->assertSame('Stubs\Interfaces\BazAwareInterface|null', $dnf->dnf()); $this->assertInstanceOf(OrClause::class, $dnf); $dnfTypes = $dnf->getTypes(); $this->assertInstanceOf(UserDefinedType::class, $dnfTypes[0]->getTypes()[0]); // Gets jammed into an AND @@ -68,7 +68,7 @@ public function test_getFromReflectionType() : void { }))->getReturnType() ); $this->assertInstanceOf(OrClause::class, $dnf); - $this->assertSame('Interfaces\FooAwareInterface|Interfaces\BazAwareInterface', $dnf->dnf()); + $this->assertSame('Stubs\Interfaces\FooAwareInterface|Stubs\Interfaces\BazAwareInterface', $dnf->dnf()); $dnf = DNF::getFromReflectionType( (new \ReflectionFunction(function () : FooAwareInterface&BazAwareInterface { @@ -76,7 +76,7 @@ public function test_getFromReflectionType() : void { }))->getReturnType() ); $this->assertInstanceOf(AndClause::class, $dnf); - $this->assertSame('Interfaces\FooAwareInterface&Interfaces\BazAwareInterface', $dnf->dnf()); + $this->assertSame('Stubs\Interfaces\FooAwareInterface&Stubs\Interfaces\BazAwareInterface', $dnf->dnf()); } public function test_getFromReflectionType_exception() : void { @@ -223,12 +223,12 @@ public function test_getFromReturnType() : void { $foo = fn () : FooAwareInterface|BazAwareInterface => $this->getMockBuilder(FooAwareInterface::class)->getMock(); $rf = new \ReflectionFunction($foo); $dnf = DNF::getFromReturnType($rf); - $this->assertSame('Interfaces\FooAwareInterface|Interfaces\BazAwareInterface', $dnf->dnf()); + $this->assertSame('Stubs\Interfaces\FooAwareInterface|Stubs\Interfaces\BazAwareInterface', $dnf->dnf()); $foo = fn () : FooAwareInterface&BazAwareInterface => $this->getMockBuilder(FooAwareInterface::class)->getMock(); $rf = new \ReflectionFunction($foo); $dnf = DNF::getFromReturnType($rf); - $this->assertSame('Interfaces\FooAwareInterface&Interfaces\BazAwareInterface', $dnf->dnf()); + $this->assertSame('Stubs\Interfaces\FooAwareInterface&Stubs\Interfaces\BazAwareInterface', $dnf->dnf()); } } diff --git a/test/IntegrationTest.php b/test/IntegrationTest.php index 5cd6b71..57ea5c1 100644 --- a/test/IntegrationTest.php +++ b/test/IntegrationTest.php @@ -8,12 +8,12 @@ use donatj\PhpDnfSolver\Types\CallableType; use donatj\PhpDnfSolver\Types\OrClause; use donatj\PhpDnfSolver\Types\UserDefinedType; -use Interfaces\BazAwareInterface; -use Interfaces\FooAwareInterface; -use Objects\Person\BarPersonInterface; -use Objects\Person\InvokablePersonFactory; -use Objects\Person\PersonInterface; use PHPUnit\Framework\TestCase; +use Stubs\Interfaces\BazAwareInterface; +use Stubs\Interfaces\FooAwareInterface; +use Stubs\Objects\Person\BarPersonInterface; +use Stubs\Objects\Person\InvokablePersonFactory; +use Stubs\Objects\Person\PersonInterface; class IntegrationTest extends TestCase { diff --git a/test/Types/AndClauseTest.php b/test/Types/AndClauseTest.php index 9cfce6a..b2fec10 100644 --- a/test/Types/AndClauseTest.php +++ b/test/Types/AndClauseTest.php @@ -5,9 +5,9 @@ use donatj\PhpDnfSolver\Types\AndClause; use donatj\PhpDnfSolver\Types\BuiltInType; use donatj\PhpDnfSolver\Types\UserDefinedType; -use Interfaces\BazAwareInterface; -use Interfaces\FooAwareInterface; use PHPUnit\Framework\TestCase; +use Stubs\Interfaces\BazAwareInterface; +use Stubs\Interfaces\FooAwareInterface; class AndClauseTest extends TestCase { @@ -34,7 +34,7 @@ public function test_dnf() : void { new UserDefinedType(FooAwareInterface::class), ); - $this->assertSame('Interfaces\BazAwareInterface&Interfaces\FooAwareInterface', $clause->dnf()); + $this->assertSame('Stubs\Interfaces\BazAwareInterface&Stubs\Interfaces\FooAwareInterface', $clause->dnf()); } } diff --git a/test/Types/OrClauseTest.php b/test/Types/OrClauseTest.php index a48d290..c56ad2e 100644 --- a/test/Types/OrClauseTest.php +++ b/test/Types/OrClauseTest.php @@ -6,10 +6,10 @@ use donatj\PhpDnfSolver\Types\BuiltInType; use donatj\PhpDnfSolver\Types\OrClause; use donatj\PhpDnfSolver\Types\UserDefinedType; -use Interfaces\BazAwareInterface; -use Interfaces\FooAwareInterface; -use Objects\Person\BarPersonInterface; use PHPUnit\Framework\TestCase; +use Stubs\Interfaces\BazAwareInterface; +use Stubs\Interfaces\FooAwareInterface; +use Stubs\Objects\Person\BarPersonInterface; class OrClauseTest extends TestCase { @@ -66,7 +66,7 @@ public function test_dnf() : void { new UserDefinedType(FooAwareInterface::class), ); - $this->assertSame('Interfaces\BazAwareInterface|Interfaces\FooAwareInterface', $clause->dnf()); + $this->assertSame('Stubs\Interfaces\BazAwareInterface|Stubs\Interfaces\FooAwareInterface', $clause->dnf()); } } diff --git a/test/Types/UserDefinedTypeTest.php b/test/Types/UserDefinedTypeTest.php index 6de3c1d..da63f95 100644 --- a/test/Types/UserDefinedTypeTest.php +++ b/test/Types/UserDefinedTypeTest.php @@ -4,9 +4,9 @@ use donatj\PhpDnfSolver\Exceptions\InvalidArgumentException; use donatj\PhpDnfSolver\Types\UserDefinedType; -use Interfaces\BazAwareInterface; use PHPUnit\Framework\TestCase; -use Traits\BazAwareTrait; +use Stubs\Interfaces\BazAwareInterface; +use Stubs\Traits\BazAwareTrait; class UserDefinedTypeTest extends TestCase { diff --git a/test82/DNFTest.php b/test82/DNFTest.php index 0f0f5f0..59b15a2 100644 --- a/test82/DNFTest.php +++ b/test82/DNFTest.php @@ -4,11 +4,11 @@ use donatj\PhpDnfSolver\DNF; use donatj\PhpDnfSolver\Types\OrClause; -use Interfaces\BazAwareInterface; -use Interfaces\FooAwareInterface; -use Objects\Person\BarPerson; -use Objects\Person\InvokablePersonFactory; use PHPUnit\Framework\TestCase; +use Stubs\Interfaces\BazAwareInterface; +use Stubs\Interfaces\FooAwareInterface; +use Stubs\Objects\Person\BarPerson; +use Stubs\Objects\Person\InvokablePersonFactory; use Tests\TypeHelperTrait; class DNFTest extends TestCase { @@ -23,10 +23,10 @@ public function test_getFromReflectionType() : void { ); $this->assertInstanceOf(OrClause::class, $dnf); $this->assertCount(3, $dnf); - $this->assertSame('(Interfaces\FooAwareInterface&Interfaces\BazAwareInterface)|int|null', $dnf->dnf()); + $this->assertSame('(Stubs\Interfaces\FooAwareInterface&Stubs\Interfaces\BazAwareInterface)|int|null', $dnf->dnf()); $types = $dnf->getTypes(); - $this->assertSame('Interfaces\FooAwareInterface&Interfaces\BazAwareInterface', $types[0]->dnf()); + $this->assertSame('Stubs\Interfaces\FooAwareInterface&Stubs\Interfaces\BazAwareInterface', $types[0]->dnf()); $this->assertSame('int', $types[1]->dnf()); $this->assertSame('null', $types[2]->dnf()); }