Skip to content

Commit

Permalink
Added namespace to Configuration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
TomHAnderson committed Oct 27, 2024
1 parent 1c3bfc2 commit 63f304c
Show file tree
Hide file tree
Showing 26 changed files with 87 additions and 26 deletions.
18 changes: 18 additions & 0 deletions tests/Assets/Configuration/TypeMock.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?php

namespace LaravelDoctrineTest\ORM\Assets\Configuration;

use Doctrine\DBAL\Platforms\AbstractPlatform;
use Doctrine\DBAL\Types\Type;

class TypeMock extends Type
{
public function getSQLDeclaration(array $column, AbstractPlatform $platform): string
{
return '';
}

public function getName()
{
}
}
18 changes: 18 additions & 0 deletions tests/Assets/Configuration/TypeMock2.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?php

namespace LaravelDoctrineTest\ORM\Assets\Configuration;

use Doctrine\DBAL\Platforms\AbstractPlatform;
use Doctrine\DBAL\Types\Type;

class TypeMock2 extends Type
{
public function getSQLDeclaration(array $column, AbstractPlatform $platform): string
{
return '';
}

public function getName()
{
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
<?php

namespace LaravelDoctrineTest\ORM\Feature\Configuration\Cache;

use Mockery;
use PHPUnit\Framework\TestCase;

abstract class AbstractCacheProviderTest extends TestCase
Expand Down
2 changes: 2 additions & 0 deletions tests/Feature/Configuration/Cache/ApcCacheProviderTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

namespace LaravelDoctrineTest\ORM\Feature\Configuration\Cache;

use Illuminate\Contracts\Cache\Factory;
use Illuminate\Contracts\Cache\Repository;
use LaravelDoctrine\ORM\Configuration\Cache\ApcCacheProvider;
Expand Down
2 changes: 2 additions & 0 deletions tests/Feature/Configuration/Cache/ArrayCacheProviderTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

namespace LaravelDoctrineTest\ORM\Feature\Configuration\Cache;

use LaravelDoctrine\ORM\Configuration\Cache\ArrayCacheProvider;
use Symfony\Component\Cache\Adapter\ArrayAdapter;

Expand Down
2 changes: 2 additions & 0 deletions tests/Feature/Configuration/Cache/CacheManagerTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

namespace LaravelDoctrineTest\ORM\Feature\Configuration\Cache;

use Illuminate\Contracts\Config\Repository;
use Illuminate\Contracts\Container\Container;
use Illuminate\Contracts\Foundation\Application;
Expand Down
2 changes: 2 additions & 0 deletions tests/Feature/Configuration/Cache/FileCacheProviderTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

namespace LaravelDoctrineTest\ORM\Feature\Configuration\Cache;

use Illuminate\Contracts\Config\Repository;
use LaravelDoctrine\ORM\Configuration\Cache\FileCacheProvider;
use Mockery as m;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?php

namespace Configuration\Cache;
//namespace Configuration\Cache;
namespace LaravelDoctrineTest\ORM\Feature\Configuration\Cache;

use Illuminate\Contracts\Cache\Factory;
use Illuminate\Contracts\Cache\Repository;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

namespace LaravelDoctrineTest\ORM\Feature\Configuration\Cache;

use Illuminate\Contracts\Cache\Factory;
use Illuminate\Contracts\Cache\Repository;
use LaravelDoctrine\ORM\Configuration\Cache\MemcachedCacheProvider;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

namespace LaravelDoctrineTest\ORM\Feature\Configuration\Cache;

use Illuminate\Contracts\Config\Repository;
use LaravelDoctrine\ORM\Configuration\Cache\PhpFileCacheProvider;
use Mockery as m;
Expand Down
2 changes: 2 additions & 0 deletions tests/Feature/Configuration/Cache/RedisCacheProviderTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

namespace LaravelDoctrineTest\ORM\Feature\Configuration\Cache;

use Illuminate\Contracts\Cache\Factory;
use Illuminate\Contracts\Cache\Repository;
use LaravelDoctrine\ORM\Configuration\Cache\RedisCacheProvider;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

namespace LaravelDoctrineTest\ORM\Feature\Configuration\Connections;

use Illuminate\Contracts\Config\Repository;
use Illuminate\Contracts\Container\Container;
use LaravelDoctrine\ORM\Configuration\Connections\ConnectionManager;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

namespace LaravelDoctrineTest\ORM\Feature\Configuration\Connections;

use Illuminate\Contracts\Config\Repository;
use LaravelDoctrine\ORM\Configuration\Connections\MysqlConnection;
use Mockery as m;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

namespace LaravelDoctrineTest\ORM\Feature\Configuration\Connections;

use Illuminate\Contracts\Config\Repository;
use LaravelDoctrine\ORM\Configuration\Connections\OracleConnection;
use Mockery as m;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

namespace LaravelDoctrineTest\ORM\Feature\Configuration\Connections;

use Illuminate\Contracts\Config\Repository;
use LaravelDoctrine\ORM\Configuration\Connections\PgsqlConnection;
use Mockery as m;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

namespace LaravelDoctrineTest\ORM\Feature\Configuration\Connections;

use Doctrine\DBAL\Connections\PrimaryReadReplicaConnection as PrimaryReadReplicaDoctrineWrapper;
use Illuminate\Contracts\Config\Repository;
use LaravelDoctrine\ORM\Configuration\Connections\PrimaryReadReplicaConnection;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

namespace LaravelDoctrineTest\ORM\Feature\Configuration\Connections;

use Illuminate\Contracts\Config\Repository;
use LaravelDoctrine\ORM\Configuration\Connections\SqliteConnection;
use Mockery as m;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

namespace LaravelDoctrineTest\ORM\Feature\Configuration\Connections;

use Illuminate\Contracts\Config\Repository;
use LaravelDoctrine\ORM\Configuration\Connections\SqlsrvConnection;
use Mockery as m;
Expand Down
29 changes: 4 additions & 25 deletions tests/Feature/Configuration/CustomTypeManagerTest.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
<?php

namespace LaravelDoctrineTest\ORM\Feature\Configuration;

use Doctrine\DBAL\Exception as DBALException;
use Doctrine\DBAL\Platforms\AbstractPlatform;
use Doctrine\DBAL\Types\Type;
use LaravelDoctrine\ORM\Configuration\CustomTypeManager;
use LaravelDoctrineTest\ORM\Assets\Configuration\TypeMock;
use LaravelDoctrineTest\ORM\Assets\Configuration\TypeMock2;
use PHPUnit\Framework\TestCase;

class CustomTypeManagerTest extends TestCase
Expand Down Expand Up @@ -49,26 +51,3 @@ public function test_cannot_get_non_existing_type()
$manager->getType('non_existing');
}
}

class TypeMock extends Type
{
public function getSQLDeclaration(array $column, AbstractPlatform $platform): string
{
return '';
}

public function getName()
{
}
}
class TypeMock2 extends Type
{
public function getSQLDeclaration(array $column, AbstractPlatform $platform): string
{
return '';
}

public function getName()
{
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

namespace LaravelDoctrineTest\ORM\Feature\Configuration;

use Illuminate\Support\Str;
use LaravelDoctrine\ORM\Configuration\LaravelNamingStrategy;
use PHPUnit\Framework\TestCase;
Expand Down
2 changes: 2 additions & 0 deletions tests/Feature/Configuration/MetaData/AttributesTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

namespace LaravelDoctrineTest\ORM\Feature\Configuration\MetaData;

use LaravelDoctrine\ORM\Configuration\MetaData\Attributes;
use Doctrine\Persistence\Mapping\Driver\MappingDriver;
use Mockery as m;
Expand Down
2 changes: 2 additions & 0 deletions tests/Feature/Configuration/MetaData/MetaDataManagerTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

namespace LaravelDoctrineTest\ORM\Feature\Configuration\MetaData;

use Doctrine\ORM\Mapping\Driver\XmlDriver;
use Illuminate\Contracts\Container\Container;
use LaravelDoctrine\ORM\Configuration\MetaData\MetaDataManager;
Expand Down
2 changes: 2 additions & 0 deletions tests/Feature/Configuration/MetaData/PhpTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

namespace LaravelDoctrineTest\ORM\Feature\Configuration\MetaData;

use Doctrine\Persistence\Mapping\Driver\MappingDriver;
use Doctrine\Persistence\Mapping\Driver\PHPDriver;
use LaravelDoctrine\ORM\Configuration\MetaData\Php;
Expand Down
2 changes: 2 additions & 0 deletions tests/Feature/Configuration/MetaData/SimplifiedXmlTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

namespace LaravelDoctrineTest\ORM\Feature\Configuration\MetaData;

use Doctrine\ORM\Mapping\Driver\SimplifiedXmlDriver;
use Doctrine\Persistence\Mapping\Driver\MappingDriver;
use LaravelDoctrine\ORM\Configuration\MetaData\SimplifiedXml;
Expand Down
2 changes: 2 additions & 0 deletions tests/Feature/Configuration/MetaData/StaticPhpTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

namespace LaravelDoctrineTest\ORM\Feature\Configuration\MetaData;

use Doctrine\Persistence\Mapping\Driver\MappingDriver;
use Doctrine\Persistence\Mapping\Driver\StaticPHPDriver;
use LaravelDoctrine\ORM\Configuration\MetaData\StaticPhp;
Expand Down
2 changes: 2 additions & 0 deletions tests/Feature/Configuration/MetaData/XmlTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

namespace LaravelDoctrineTest\ORM\Feature\Configuration\MetaData;

use Doctrine\ORM\Mapping\Driver\XmlDriver;
use Doctrine\Persistence\Mapping\Driver\MappingDriver;
use LaravelDoctrine\ORM\Configuration\MetaData\Xml;
Expand Down

0 comments on commit 63f304c

Please sign in to comment.