BaseTestCase - make static and rename methods (start names of methods with "assert" instead of "verify")

This commit is contained in:
Meritoo
2017-09-21 16:52:15 +02:00
parent 318a635ffd
commit a0d28b326e
3 changed files with 5 additions and 5 deletions

View File

@@ -135,7 +135,7 @@ abstract class BaseTestCase extends TestCase
* - string - name of the method
* - instance of ReflectionMethod - just the method (provided by ReflectionClass::getMethod() method)
*/
protected function verifyMethodVisibilityAndArguments(
protected static function assertMethodVisibilityAndArguments(
$classNamespace,
$method,
$visibilityType,
@@ -188,7 +188,7 @@ abstract class BaseTestCase extends TestCase
* method
* @throws UnknownOopVisibilityTypeException
*/
protected function verifyConstructorVisibilityAndArguments(
protected static function assertConstructorVisibilityAndArguments(
$classNamespace,
$visibilityType,
$argumentsCount = 0,
@@ -200,7 +200,7 @@ abstract class BaseTestCase extends TestCase
$reflection = new ReflectionClass($classNamespace);
$method = $reflection->getConstructor();
return $this->verifyMethodVisibilityAndArguments($classNamespace, $method, $visibilityType, $argumentsCount, $requiredArgumentsCount);
return static::assertMethodVisibilityAndArguments($classNamespace, $method, $visibilityType, $argumentsCount, $requiredArgumentsCount);
}
/**

View File

@@ -306,7 +306,7 @@ class CollectionTest extends BaseTestCase
public function testExistsVisibilityAndArguments()
{
$this->verifyMethodVisibilityAndArguments(Collection::class, 'exists', OopVisibilityType::IS_PRIVATE, 1, 1);
static::assertMethodVisibilityAndArguments(Collection::class, 'exists', OopVisibilityType::IS_PRIVATE, 1, 1);
}
/**

View File

@@ -24,7 +24,7 @@ class DatePeriodTest extends BaseTestCase
{
public function testConstructorVisibilityAndArguments()
{
$this->verifyConstructorVisibilityAndArguments(DatePeriod::class, OopVisibilityType::IS_PUBLIC, 2, 0);
static::assertConstructorVisibilityAndArguments(DatePeriod::class, OopVisibilityType::IS_PUBLIC, 2, 0);
}
/**