Skip to content

Commit

Permalink
fix test autoloading namespace paths
Browse files Browse the repository at this point in the history
  • Loading branch information
dbu committed May 6, 2024
1 parent 254bc3b commit f4d9a37
Show file tree
Hide file tree
Showing 20 changed files with 35 additions and 30 deletions.
3 changes: 1 addition & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
"psr/log": "^1 || ^2 || ^3",
"phpcr/phpcr-api-tests": "2.1.25",
"phpunit/phpunit": "^9.0",
"psr/simple-cache": "^1.0 || ^2.0 || ^3.0",
"symfony/cache": "^5.4 || ^6.2 || ^7.0",
"phpstan/phpstan": "^1.10"
},
Expand All @@ -45,7 +44,7 @@
},
"autoload-dev": {
"psr-0": {
"Jackalope\\Test\\": "tests/",
"Jackalope\\Tests\\": "tests/",
"Jackalope\\": "vendor/jackalope/jackalope/tests",
"PHPCR": "vendor/phpcr/phpcr/tests"
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
<?php

namespace Jackalope\Transport\DoctrineDBAL;
namespace Jackalope\Tests\DoctrineDBAL;

use Doctrine\DBAL\Connection;
use Jackalope\Factory;
use Jackalope\Transport\DoctrineDBAL\CachedClient;
use Jackalope\Transport\TransportInterface;
use Symfony\Component\Cache\Adapter\ArrayAdapter;
use Symfony\Component\Cache\Psr16Cache;

class CachedClientFunctionalTest extends ClientTest
{
protected function getClient(Connection $conn)
protected function getClient(Connection $conn): TransportInterface
{
$nodeCacheAdapter = new ArrayAdapter();
$nodeCache = new Psr16Cache($nodeCacheAdapter);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<?php

namespace Jackalope\Transport\DoctrineDBAL;
namespace Jackalope\Tests\DoctrineDBAL;

use Doctrine\DBAL\Connection;
use Jackalope\Factory;
use Jackalope\Test\FunctionalTestCase;
use Jackalope\Tests\FunctionalTestCase;
use Jackalope\Transport\DoctrineDBAL\CachedClient;
use Jackalope\Transport\TransportInterface;
use Psr\SimpleCache\CacheInterface;
use Symfony\Component\Cache\Adapter\ArrayAdapter;
Expand All @@ -30,7 +31,7 @@ public function testArrayObjectIsConvertedToArray(): void
self::assertIsArray($namespaces);
}

public function testCacheHit()
public function testCacheHit(): void
{
$cache = new \stdClass();
$cache->foo = 'bar';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php

namespace Jackalope\Transport\DoctrineDBAL;
namespace Jackalope\Tests\DoctrineDBAL;

use Doctrine\DBAL\Platforms\MySQLPlatform;
use Jackalope\Test\FunctionalTestCase;
use Jackalope\Tests\FunctionalTestCase;
use PHPCR\PropertyType;
use PHPCR\Query\QOM\QueryObjectModelConstantsInterface;
use PHPCR\Query\QueryInterface;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php

namespace Jackalope\Transport\DoctrineDBAL;
namespace Jackalope\Tests\DoctrineDBAL;

use Doctrine\DBAL\Platforms\SqlitePlatform;
use Jackalope\Test\FunctionalTestCase;
use Jackalope\Tests\FunctionalTestCase;
use PHPCR\PropertyType;

class DeleteCascadeTest extends FunctionalTestCase
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<?php

namespace Jackalope\Transport\DoctrineDBAL;
namespace Jackalope\Tests\DoctrineDBAL;

use Jackalope\Test\FunctionalTestCase;

use Jackalope\Tests\FunctionalTestCase;

class PrefetchTest extends FunctionalTestCase
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Jackalope\Transport\DoctrineDBAL\Query;
namespace Jackalope\Tests\DoctrineDBAL\Query;

use Doctrine\DBAL\Platforms\PostgreSQL94Platform;
use Doctrine\DBAL\Platforms\PostgreSQLPlatform;
Expand All @@ -10,7 +10,8 @@
use Jackalope\Query\QOM\PropertyValue;
use Jackalope\Query\QOM\QueryObjectModel;
use Jackalope\Query\QOM\QueryObjectModelFactory;
use Jackalope\Test\TestCase;
use Jackalope\Tests\TestCase;
use Jackalope\Transport\DoctrineDBAL\Query\QOMWalker;
use PHPCR\NodeType\NodeTypeManagerInterface;
use PHPCR\Query\InvalidQueryException;
use PHPCR\Query\QOM\QueryObjectModelConstantsInterface;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php

namespace Jackalope\Transport\DoctrineDBAL\XmlParser;
namespace Jackalope\Tests\DoctrineDBAL\XmlParser;

use Jackalope\Factory;
use Jackalope\Test\TestCase;
use Jackalope\Tests\TestCase;
use PHPCR\Util\ValueConverter;

class XmlToPropsParserTest extends TestCase
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php

namespace Jackalope\Transport\DoctrineDBAL\XmlPropsRemover;
namespace Jackalope\Tests\DoctrineDBAL\XmlPropsRemover;

use Jackalope\Factory;
use Jackalope\Test\TestCase;
use Jackalope\Tests\TestCase;
use Jackalope\Transport\DoctrineDBAL\XmlParser\XmlToPropsParser;
use PHPCR\Util\ValueConverter;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Jackalope\Test;
namespace Jackalope\Tests;

use Doctrine\DBAL\Connection;
use Doctrine\DBAL\Platforms\SqlitePlatform;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<?php

namespace Jackalope;
namespace Jackalope\Tests;

use Doctrine\DBAL\Connection;
use Jackalope\RepositoryFactoryDoctrineDBAL;
use PHPCR\ConfigurationException;
use PHPUnit\Framework\TestCase;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Jackalope\Test\Fixture;
namespace Jackalope\Tests\Test\Fixture;

use PHPCR\Util\PathHelper;
use PHPCR\Util\UUIDHelper;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Jackalope\Test\Fixture;
namespace Jackalope\Tests\Test\Fixture;

/**
* Jackalope Document or System Views.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Jackalope\Test\Fixture;
namespace Jackalope\Tests\Test\Fixture;

/**
* Base for Jackalope Document or System Views and PHPUnit DBUnit Fixture XML classes.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Jackalope\Test\Tester;
namespace Jackalope\Tests\Test\Tester;

use Doctrine\DBAL\Connection;
use PHPCR\Test\FixtureLoaderInterface;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Jackalope\Test\Tester;
namespace Jackalope\Tests\Test\Tester;

/**
* MySQL specific tester class.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Jackalope\Test\Tester;
namespace Jackalope\Tests\Test\Tester;

/**
* PostgreSQL specific tester class.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Jackalope\Test\Tester;
namespace Jackalope\Tests\Test\Tester;

use Doctrine\DBAL\Schema\Column;
use Doctrine\DBAL\Schema\Index;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Jackalope\Test;
namespace Jackalope\Tests;

use Doctrine\DBAL\Connection;
use Doctrine\DBAL\DriverManager;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Jackalope\Tools\Console;
namespace Jackalope\Tests\Tools\Console;

use Doctrine\DBAL\Connection;
use Doctrine\DBAL\Platforms\AbstractPlatform;
Expand Down

0 comments on commit f4d9a37

Please sign in to comment.