Skip to content

Commit

Permalink
Reduce constant visibility under tests/
Browse files Browse the repository at this point in the history
  • Loading branch information
phansys authored and franmomu committed Aug 1, 2023
1 parent f21d888 commit ef277c9
Show file tree
Hide file tree
Showing 120 changed files with 310 additions and 330 deletions.
6 changes: 2 additions & 4 deletions tests/Gedmo/Blameable/BlameableDocumentTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,9 @@
*/
final class BlameableDocumentTest extends BaseTestCaseMongoODM
{
public const TEST_USERNAME = 'testuser';
private const TEST_USERNAME = 'testuser';

public const TYPE = Type::class;
public const USER = User::class;
public const ARTICLE = Article::class;
private const ARTICLE = Article::class;

protected function setUp(): void
{
Expand Down
6 changes: 3 additions & 3 deletions tests/Gedmo/Blameable/BlameableTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@
*/
final class BlameableTest extends BaseTestCaseORM
{
public const ARTICLE = Article::class;
public const COMMENT = Comment::class;
public const TYPE = Type::class;
private const ARTICLE = Article::class;
private const COMMENT = Comment::class;
private const TYPE = Type::class;

protected function setUp(): void
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Gedmo/Blameable/ChangeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
*/
final class ChangeTest extends BaseTestCaseORM
{
public const FIXTURE = TitledArticle::class;
private const FIXTURE = TitledArticle::class;

/**
* @var BlameableListener
Expand Down
2 changes: 1 addition & 1 deletion tests/Gedmo/Blameable/NoInterfaceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
*/
final class NoInterfaceTest extends BaseTestCaseORM
{
public const FIXTURE = WithoutInterface::class;
private const FIXTURE = WithoutInterface::class;

protected function setUp(): void
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Gedmo/Blameable/NoUserTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
*/
final class NoUserTest extends BaseTestCaseMongoODM
{
public const ARTICLE = Article::class;
private const ARTICLE = Article::class;

protected function setUp(): void
{
Expand Down
4 changes: 2 additions & 2 deletions tests/Gedmo/Blameable/ProtectedPropertySupperclassTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
*/
final class ProtectedPropertySupperclassTest extends BaseTestCaseORM
{
public const SUPERCLASS = SupperClassExtension::class;
public const TRANSLATION = Translation::class;
private const SUPERCLASS = SupperClassExtension::class;
private const TRANSLATION = Translation::class;

protected function setUp(): void
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Gedmo/Blameable/TraitUsageTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
*/
final class TraitUsageTest extends BaseTestCaseORM
{
public const TARGET = UsingTrait::class;
private const TARGET = UsingTrait::class;

protected function setUp(): void
{
Expand Down
4 changes: 2 additions & 2 deletions tests/Gedmo/IpTraceable/ChangeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
*/
final class ChangeTest extends BaseTestCaseORM
{
public const TEST_IP = '34.234.1.10';
public const FIXTURE = TitledArticle::class;
private const TEST_IP = '34.234.1.10';
private const FIXTURE = TitledArticle::class;

/**
* @var IpTraceableListener
Expand Down
5 changes: 2 additions & 3 deletions tests/Gedmo/IpTraceable/IpTraceableDocumentTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,9 @@
*/
final class IpTraceableDocumentTest extends BaseTestCaseMongoODM
{
public const TEST_IP = '34.234.1.10';
private const TEST_IP = '34.234.1.10';

public const ARTICLE = Article::class;
public const TYPE = Type::class;
private const ARTICLE = Article::class;

protected function setUp(): void
{
Expand Down
8 changes: 4 additions & 4 deletions tests/Gedmo/IpTraceable/IpTraceableTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@
*/
final class IpTraceableTest extends BaseTestCaseORM
{
public const TEST_IP = '34.234.1.10';
private const TEST_IP = '34.234.1.10';

public const ARTICLE = Article::class;
public const COMMENT = Comment::class;
public const TYPE = Type::class;
private const ARTICLE = Article::class;
private const COMMENT = Comment::class;
private const TYPE = Type::class;

protected function setUp(): void
{
Expand Down
4 changes: 2 additions & 2 deletions tests/Gedmo/IpTraceable/NoInterfaceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
*/
final class NoInterfaceTest extends BaseTestCaseORM
{
public const TEST_IP = '34.234.1.10';
public const FIXTURE = WithoutInterface::class;
private const TEST_IP = '34.234.1.10';
private const FIXTURE = WithoutInterface::class;

protected function setUp(): void
{
Expand Down
4 changes: 2 additions & 2 deletions tests/Gedmo/IpTraceable/TraitUsageTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
*/
final class TraitUsageTest extends BaseTestCaseORM
{
public const TEST_IP = '34.234.1.10';
public const TARGET = UsingTrait::class;
private const TEST_IP = '34.234.1.10';
private const TARGET = UsingTrait::class;

protected function setUp(): void
{
Expand Down
7 changes: 3 additions & 4 deletions tests/Gedmo/Loggable/LoggableDocumentTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,9 @@
*/
final class LoggableDocumentTest extends BaseTestCaseMongoODM
{
public const ARTICLE = Article::class;
public const COMMENT = Comment::class;
public const RELATED_ARTICLE = RelatedArticle::class;
public const COMMENT_LOG = \Gedmo\Tests\Loggable\Fixture\Document\Log\Comment::class;
private const ARTICLE = Article::class;
private const COMMENT = Comment::class;
private const COMMENT_LOG = \Gedmo\Tests\Loggable\Fixture\Document\Log\Comment::class;

protected function setUp(): void
{
Expand Down
12 changes: 6 additions & 6 deletions tests/Gedmo/Loggable/LoggableEntityTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@
*/
abstract class LoggableEntityTest extends BaseTestCaseORM
{
public const ARTICLE = Article::class;
public const COMMENT = Comment::class;
public const COMPOSITE = Composite::class;
public const COMPOSITE_RELATION = CompositeRelation::class;
public const RELATED_ARTICLE = RelatedArticle::class;
public const COMMENT_LOG = \Gedmo\Tests\Loggable\Fixture\Entity\Log\Comment::class;
private const ARTICLE = Article::class;
private const COMMENT = Comment::class;
private const COMPOSITE = Composite::class;
private const COMPOSITE_RELATION = CompositeRelation::class;
private const RELATED_ARTICLE = RelatedArticle::class;
private const COMMENT_LOG = \Gedmo\Tests\Loggable\Fixture\Entity\Log\Comment::class;

public function testShouldHandleClonedEntity(): void
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Gedmo/Mapping/ExtensionODMTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

final class ExtensionODMTest extends BaseTestCaseMongoODM
{
public const USER = User::class;
private const USER = User::class;

/**
* @var EncoderListener
Expand Down
2 changes: 1 addition & 1 deletion tests/Gedmo/Mapping/ExtensionORMTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

final class ExtensionORMTest extends BaseTestCaseORM
{
public const USER = User::class;
private const USER = User::class;

/**
* @var EncoderListener
Expand Down
6 changes: 3 additions & 3 deletions tests/Gedmo/Mapping/LoggableORMMappingTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@
*/
final class LoggableORMMappingTest extends ORMMappingTestCase
{
public const YAML_CATEGORY = Category::class;
public const COMPOSITE = LoggableComposite::class;
public const COMPOSITE_RELATION = LoggableCompositeRelation::class;
private const YAML_CATEGORY = Category::class;
private const COMPOSITE = LoggableComposite::class;
private const COMPOSITE_RELATION = LoggableCompositeRelation::class;

/**
* @var EntityManager
Expand Down
4 changes: 2 additions & 2 deletions tests/Gedmo/Mapping/MappingTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
*/
final class MappingTest extends TestCase
{
public const TEST_ENTITY_CATEGORY = BehavioralCategory::class;
public const TEST_ENTITY_TRANSLATION = Translation::class;
private const TEST_ENTITY_CATEGORY = BehavioralCategory::class;
private const TEST_ENTITY_TRANSLATION = Translation::class;

/**
* @var EntityManager
Expand Down
4 changes: 2 additions & 2 deletions tests/Gedmo/Mapping/SluggableMappingTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
*/
final class SluggableMappingTest extends ORMMappingTestCase
{
public const TEST_YAML_ENTITY_CLASS = Category::class;
public const SLUGGABLE = Sluggable::class;
private const TEST_YAML_ENTITY_CLASS = Category::class;
private const SLUGGABLE = Sluggable::class;

/**
* @var EntityManager
Expand Down
2 changes: 1 addition & 1 deletion tests/Gedmo/Mapping/TimestampableMappingTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
*/
final class TimestampableMappingTest extends ORMMappingTestCase
{
public const TEST_YAML_ENTITY_CLASS = Category::class;
private const TEST_YAML_ENTITY_CLASS = Category::class;

/**
* @var EntityManager
Expand Down
2 changes: 1 addition & 1 deletion tests/Gedmo/Mapping/TranslatableMappingTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
*/
final class TranslatableMappingTest extends ORMMappingTestCase
{
public const TEST_YAML_ENTITY_CLASS = User::class;
private const TEST_YAML_ENTITY_CLASS = User::class;

/**
* @var TranslatableListener
Expand Down
6 changes: 3 additions & 3 deletions tests/Gedmo/Mapping/TreeMappingTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@
*/
final class TreeMappingTest extends ORMMappingTestCase
{
public const TEST_YAML_ENTITY_CLASS = Category::class;
public const YAML_CLOSURE_CATEGORY = ClosureCategory::class;
public const YAML_MATERIALIZED_PATH_CATEGORY = MaterializedPathCategory::class;
private const TEST_YAML_ENTITY_CLASS = Category::class;
private const YAML_CLOSURE_CATEGORY = ClosureCategory::class;
private const YAML_MATERIALIZED_PATH_CATEGORY = MaterializedPathCategory::class;

/**
* @var EntityManager
Expand Down
24 changes: 12 additions & 12 deletions tests/Gedmo/ReferenceIntegrity/ReferenceIntegrityDocumentTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,23 +25,23 @@
*/
final class ReferenceIntegrityDocumentTest extends BaseTestCaseMongoODM
{
public const TYPE_ONE_NULLIFY_CLASS = Fixture\Document\OneNullify\Type::class;
public const ARTICLE_ONE_NULLIFY_CLASS = Fixture\Document\OneNullify\Article::class;
private const TYPE_ONE_NULLIFY_CLASS = Fixture\Document\OneNullify\Type::class;
private const ARTICLE_ONE_NULLIFY_CLASS = Fixture\Document\OneNullify\Article::class;

public const TYPE_MANY_NULLIFY_CLASS = Fixture\Document\ManyNullify\Type::class;
public const ARTICLE_MANY_NULLIFY_CLASS = Fixture\Document\ManyNullify\Article::class;
private const TYPE_MANY_NULLIFY_CLASS = Fixture\Document\ManyNullify\Type::class;
private const ARTICLE_MANY_NULLIFY_CLASS = Fixture\Document\ManyNullify\Article::class;

public const TYPE_ONE_PULL_CLASS = Fixture\Document\OnePull\Type::class;
public const ARTICLE_ONE_PULL_CLASS = Fixture\Document\OnePull\Article::class;
private const TYPE_ONE_PULL_CLASS = Fixture\Document\OnePull\Type::class;
private const ARTICLE_ONE_PULL_CLASS = Fixture\Document\OnePull\Article::class;

public const TYPE_MANY_PULL_CLASS = Fixture\Document\ManyPull\Type::class;
public const ARTICLE_MANY_PULL_CLASS = Fixture\Document\ManyPull\Article::class;
private const TYPE_MANY_PULL_CLASS = Fixture\Document\ManyPull\Type::class;
private const ARTICLE_MANY_PULL_CLASS = Fixture\Document\ManyPull\Article::class;

public const TYPE_ONE_RESTRICT_CLASS = Fixture\Document\OneRestrict\Type::class;
public const ARTICLE_ONE_RESTRICT_CLASS = Fixture\Document\OneRestrict\Article::class;
private const TYPE_ONE_RESTRICT_CLASS = Fixture\Document\OneRestrict\Type::class;
private const ARTICLE_ONE_RESTRICT_CLASS = Fixture\Document\OneRestrict\Article::class;

public const TYPE_MANY_RESTRICT_CLASS = Type::class;
public const ARTICLE_MANY_RESTRICT_CLASS = Article::class;
private const TYPE_MANY_RESTRICT_CLASS = Type::class;
private const ARTICLE_MANY_RESTRICT_CLASS = Article::class;

protected function setUp(): void
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Gedmo/Sluggable/CustomTransliteratorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
*/
final class CustomTransliteratorTest extends BaseTestCaseORM
{
public const ARTICLE = Article::class;
private const ARTICLE = Article::class;

public function testStandardTransliteratorFailsOnChineseCharacters(): void
{
Expand Down
4 changes: 2 additions & 2 deletions tests/Gedmo/Sluggable/Handlers/BothSlugHandlerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
*/
final class BothSlugHandlerTest extends BaseTestCaseORM
{
public const OCCUPATION = Occupation::class;
public const PERSON = Person::class;
private const OCCUPATION = Occupation::class;
private const PERSON = Person::class;

protected function setUp(): void
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
*/
final class RelativeSlugHandlerDocumentTest extends BaseTestCaseMongoODM
{
public const ARTICLE = Article::class;
public const SLUG = RelativeSlug::class;
private const ARTICLE = Article::class;
private const SLUG = RelativeSlug::class;

protected function setUp(): void
{
Expand Down
4 changes: 2 additions & 2 deletions tests/Gedmo/Sluggable/Handlers/RelativeSlugHandlerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
*/
final class RelativeSlugHandlerTest extends BaseTestCaseORM
{
public const SLUG = ArticleRelativeSlug::class;
public const ARTICLE = Article::class;
private const SLUG = ArticleRelativeSlug::class;
private const ARTICLE = Article::class;

protected function setUp(): void
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
*/
final class TreeSlugHandlerDocumentTest extends BaseTestCaseMongoODM
{
public const SLUG = TreeSlug::class;
private const SLUG = TreeSlug::class;

protected function setUp(): void
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

final class TreeSlugHandlerPrefixSuffixTest extends BaseTestCaseORM
{
public const TARGET = TreeSlugPrefixSuffix::class;
private const TARGET = TreeSlugPrefixSuffix::class;

protected function setUp(): void
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Gedmo/Sluggable/Handlers/TreeSlugHandlerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
*/
final class TreeSlugHandlerTest extends BaseTestCaseORM
{
public const TARGET = TreeSlug::class;
private const TARGET = TreeSlug::class;

protected function setUp(): void
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

final class TreeSlugHandlerUniqueTest extends BaseTestCaseORM
{
public const TARGET = TreeSlug::class;
private const TARGET = TreeSlug::class;

protected function setUp(): void
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
*/
final class UserRelativeSlugHandlerTest extends BaseTestCaseORM
{
public const USER = User::class;
public const COMPANY = Company::class;
private const USER = User::class;
private const COMPANY = Company::class;

protected function setUp(): void
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Gedmo/Sluggable/Issue/Issue104Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
*/
final class Issue104Test extends BaseTestCaseORM
{
public const CAR = Car::class;
private const CAR = Car::class;

public function testShouldThrowAnExceptionWhenMappedSuperclassProtectedProperty(): void
{
Expand Down
4 changes: 2 additions & 2 deletions tests/Gedmo/Sluggable/Issue/Issue1058Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
*/
final class Issue1058Test extends BaseTestCaseORM
{
public const ARTICLE = Page::class;
public const USER = User::class;
private const ARTICLE = Page::class;
private const USER = User::class;

protected function setUp(): void
{
Expand Down
Loading

0 comments on commit ef277c9

Please sign in to comment.