php-slim4-server.model_test.mustache Maven / Gradle / Ivy
licenseInfo}}
/**
* NOTE: This class is auto generated by the openapi generator program.
* https://github.com/openapitools/openapi-generator
* Please update the test case below to test the model.
*/{{#models}}
{{#model}}
namespace {{modelPackage}};
use PHPUnit\Framework\TestCase;
use {{modelPackage}}\{{classname}};
/**
* {{classname}}Test Class Doc Comment
*
* @package {{modelPackage}}
* @author OpenAPI Generator team
* @link https://github.com/openapitools/openapi-generator
*
* @coversDefaultClass \{{modelPackage}}\{{classname}}
*/
class {{classname}}Test extends TestCase
{
/**
* Setup before running any test cases
*/
public static function setUpBeforeClass(): void
{
}
/**
* Setup before running each test case
*/
public function setUp(): void
{
}
/**
* Clean up after running each test case
*/
public function tearDown(): void
{
}
/**
* Clean up after running all test cases
*/
public static function tearDownAfterClass(): void
{
}
/**
* Test "{{classname}}"
*/
public function test{{classname}}()
{
$test{{classname}} = new {{classname}}();
$namespacedClassname = {{classname}}::getModelsNamespace() . '\\{{classname}}';
$this->assertSame('\\' . {{classname}}::class, $namespacedClassname);
$this->assertTrue(
class_exists($namespacedClassname),
sprintf('Assertion failed that "%s" class exists', $namespacedClassname)
);
$this->markTestIncomplete(
'Test of "{{classname}}" model has not been implemented yet.'
);
}
{{#vars}}
/**
* Test attribute "{{name}}"
*/
public function testProperty{{nameInCamelCase}}()
{
$this->markTestIncomplete(
'Test of "{{name}}" property in "{{classname}}" model has not been implemented yet.'
);
}
{{/vars}}
/**
* Test getOpenApiSchema static method
* @covers ::getOpenApiSchema
*/
public function testGetOpenApiSchema()
{
$schemaArr = {{classname}}::getOpenApiSchema();
$this->assertIsArray($schemaArr);
}
}
{{/model}}{{/models}}