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,23 +76,21 @@ class ReflectionTest extends BaseTestCase
]));
}
public function testGetClassNameDuplicatedName()
{
/*
* Class with namespace containing name of class (duplicated string)
/**
* A case when namespace of class contains name of class (name of class is duplicated, occurs twice)
*/
if (class_exists('Symfony\Bundle\SecurityBundle\SecurityBundle')) {
public function testGetClassWhileNamespaceContainsClassName()
{
self::assertEquals(
'Symfony\Bundle\SecurityBundle\SecurityBundle',
Reflection::getClassName('Symfony\Bundle\SecurityBundle\SecurityBundle')
'Meritoo\Common\Collection\Collection',
Reflection::getClassName(Collection::class)
);
self::assertEquals(
'SecurityBundle',
Reflection::getClassName('Symfony\Bundle\SecurityBundle\SecurityBundle', true)
'Collection',
Reflection::getClassName(Collection::class, true)
);
}
}
public function testGetClassNamespaceNotExistingClass()
{
@@ -116,18 +114,16 @@ class ReflectionTest extends BaseTestCase
]));
}
public function testGetClassNamespaceDuplicatedName()
{
/*
* Class with namespace containing name of class (duplicated string)
/**
* A case when namespace of class contains name of class (name of class is duplicated, occurs twice)
*/
if (class_exists('Symfony\Bundle\SecurityBundle\SecurityBundle')) {
public function testGetClassNamespaceWhileNamespaceContainsClassName()
{
self::assertEquals(
'Symfony\Bundle\SecurityBundle',
Reflection::getClassNamespace('Symfony\Bundle\SecurityBundle\SecurityBundle')
'Meritoo\Common\Collection',
Reflection::getClassNamespace(Collection::class)
);
}
}
/**
* @param mixed $invalidClass Empty value, e.g. ""