refactor(php): use self::markTestIncomplete instead of instance calls (#17824)

It's reported by phpstan as `Dynamic call to static method PHPUnit\Framework\Assert::markTestIncomplete().`.

The method is static, therefore it should not be called from instance context.
This commit is contained in:
Simon Podlipsky
2024-02-12 08:48:44 +01:00
committed by GitHub
parent cd23dfd3ce
commit f3ac4498df
203 changed files with 790 additions and 790 deletions

View File

@@ -70,7 +70,7 @@ use PHPUnit\Framework\TestCase;
public function test{{vendorExtensions.x-test-operation-id}}()
{
// TODO: implement
$this->markTestIncomplete('Not implemented');
self::markTestIncomplete('Not implemented');
}
{{/operation}}
}

View File

@@ -67,7 +67,7 @@ class {{classname}}Test extends TestCase
public function test{{classname}}()
{
// TODO: implement
$this->markTestIncomplete('Not implemented');
self::markTestIncomplete('Not implemented');
}
{{#vars}}
@@ -77,7 +77,7 @@ class {{classname}}Test extends TestCase
public function testProperty{{nameInCamelCase}}()
{
// TODO: implement
$this->markTestIncomplete('Not implemented');
self::markTestIncomplete('Not implemented');
}
{{/vars}}
}

View File

@@ -62,7 +62,7 @@ class {{userClassname}}Test extends TestCase
*/
public function test{{operationIdCamelCase}}()
{
$this->markTestIncomplete(
self::markTestIncomplete(
'Test of "{{operationId}}" method has not been implemented yet.'
);
}

View File

@@ -65,7 +65,7 @@ class {{classname}}Test extends TestCase
class_exists($namespacedClassname),
sprintf('Assertion failed that "%s" class exists', $namespacedClassname)
);
$this->markTestIncomplete(
self::markTestIncomplete(
'Test of "{{classname}}" model has not been implemented yet.'
);
}
@@ -76,7 +76,7 @@ class {{classname}}Test extends TestCase
*/
public function testProperty{{nameInCamelCase}}()
{
$this->markTestIncomplete(
self::markTestIncomplete(
'Test of "{{name}}" property in "{{classname}}" model has not been implemented yet.'
);
}
@@ -92,4 +92,4 @@ class {{classname}}Test extends TestCase
$this->assertIsArray($schemaArr);
}
}
{{/model}}{{/models}}
{{/model}}{{/models}}

View File

@@ -72,7 +72,7 @@ use PHPUnit\Framework\TestCase;
public function test{{vendorExtensions.x-test-operation-id}}()
{
// TODO: implement
$this->markTestIncomplete('Not implemented');
self::markTestIncomplete('Not implemented');
}
{{/operation}}
}

View File

@@ -69,7 +69,7 @@ class {{classname}}Test extends TestCase
public function test{{classname}}()
{
// TODO: implement
$this->markTestIncomplete('Not implemented');
self::markTestIncomplete('Not implemented');
}
{{#vars}}
@@ -79,7 +79,7 @@ class {{classname}}Test extends TestCase
public function testProperty{{nameInCamelCase}}()
{
// TODO: implement
$this->markTestIncomplete('Not implemented');
self::markTestIncomplete('Not implemented');
}
{{/vars}}
}