Tests > fix "This test did not perform any assertions" bug > make compatible with PHPUnit 8.0 (and PHP 7.2+)

This commit is contained in:
Meritoo
2019-04-02 10:40:51 +02:00
parent 8a27cd94ef
commit 95a81ab322

View File

@@ -76,22 +76,20 @@ class ReflectionTest extends BaseTestCase
]));
}
public function testGetClassNameDuplicatedName()
/**
* A case when namespace of class contains name of class (name of class is duplicated, occurs twice)
*/
public function testGetClassWhileNamespaceContainsClassName()
{
/*
* Class with namespace containing name of class (duplicated string)
*/
if (class_exists('Symfony\Bundle\SecurityBundle\SecurityBundle')) {
self::assertEquals(
'Symfony\Bundle\SecurityBundle\SecurityBundle',
Reflection::getClassName('Symfony\Bundle\SecurityBundle\SecurityBundle')
);
self::assertEquals(
'Meritoo\Common\Collection\Collection',
Reflection::getClassName(Collection::class)
);
self::assertEquals(
'SecurityBundle',
Reflection::getClassName('Symfony\Bundle\SecurityBundle\SecurityBundle', true)
);
}
self::assertEquals(
'Collection',
Reflection::getClassName(Collection::class, true)
);
}
public function testGetClassNamespaceNotExistingClass()
@@ -116,17 +114,15 @@ class ReflectionTest extends BaseTestCase
]));
}
public function testGetClassNamespaceDuplicatedName()
/**
* A case when namespace of class contains name of class (name of class is duplicated, occurs twice)
*/
public function testGetClassNamespaceWhileNamespaceContainsClassName()
{
/*
* Class with namespace containing name of class (duplicated string)
*/
if (class_exists('Symfony\Bundle\SecurityBundle\SecurityBundle')) {
self::assertEquals(
'Symfony\Bundle\SecurityBundle',
Reflection::getClassNamespace('Symfony\Bundle\SecurityBundle\SecurityBundle')
);
}
self::assertEquals(
'Meritoo\Common\Collection',
Reflection::getClassNamespace(Collection::class)
);
}
/**