32 lines
577 B
PHP
32 lines
577 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Tests\Support\Api;
|
|
|
|
use PHPUnit\Framework\TestCase;
|
|
|
|
class ApiTestCase extends TestCase
|
|
{
|
|
protected function setUp(): void
|
|
{
|
|
parent::setUp();
|
|
|
|
$skipReason = \api_test_runtime()->skipReason();
|
|
if ($skipReason !== null) {
|
|
$this->markTestSkipped($skipReason);
|
|
}
|
|
|
|
\api_test_runtime()->beginTest();
|
|
}
|
|
|
|
protected function tearDown(): void
|
|
{
|
|
if (\api_tests_enabled()) {
|
|
\api_test_runtime()->endTest();
|
|
}
|
|
|
|
parent::tearDown();
|
|
}
|
|
}
|