update sample tests, fix Java tests (#20300)

* replace removed forkMode

* remove junit runner where it's not needed

* update samples without skipping test files, but skip files named "FILES"

* revert overwriting custom tests, add custom java tests to list

* add one sample to CircleCI, fix various Java tests
This commit is contained in:
martin-mfg
2024-12-15 10:09:58 +01:00
committed by GitHub
parent 4e5a828c12
commit d87a70dd93
2192 changed files with 12623 additions and 9212 deletions

View File

@@ -222,9 +222,9 @@ class PetApiInterfaceTest extends WebTestCase
*/
protected function genTestData(string $regexp)
{
$grammar = new \Hoa\File\Read('hoa://Library/Regex/Grammar.pp');
$grammar = new \Hoa\File\Read('hoa://Library/Regex/Grammar.pp');
$compiler = \Hoa\Compiler\Llk\Llk::load($grammar);
$ast = $compiler->parse($regexp);
$ast = $compiler->parse($regexp);
$generator = new \Hoa\Regex\Visitor\Isotropic(new \Hoa\Math\Sampler\Random());
return $generator->visit($ast);

View File

@@ -152,9 +152,9 @@ class StoreApiInterfaceTest extends WebTestCase
*/
protected function genTestData(string $regexp)
{
$grammar = new \Hoa\File\Read('hoa://Library/Regex/Grammar.pp');
$grammar = new \Hoa\File\Read('hoa://Library/Regex/Grammar.pp');
$compiler = \Hoa\Compiler\Llk\Llk::load($grammar);
$ast = $compiler->parse($regexp);
$ast = $compiler->parse($regexp);
$generator = new \Hoa\Regex\Visitor\Isotropic(new \Hoa\Math\Sampler\Random());
return $generator->visit($ast);

View File

@@ -219,9 +219,9 @@ class UserApiInterfaceTest extends WebTestCase
*/
protected function genTestData(string $regexp)
{
$grammar = new \Hoa\File\Read('hoa://Library/Regex/Grammar.pp');
$grammar = new \Hoa\File\Read('hoa://Library/Regex/Grammar.pp');
$compiler = \Hoa\Compiler\Llk\Llk::load($grammar);
$ast = $compiler->parse($regexp);
$ast = $compiler->parse($regexp);
$generator = new \Hoa\Regex\Visitor\Isotropic(new \Hoa\Math\Sampler\Random());
return $generator->visit($ast);

View File

@@ -27,8 +27,9 @@
* Please update the test case below to test the model.
*/
namespace OpenAPI\Server\Model;
namespace OpenAPI\Server\Tests\Model;
use OpenAPI\Server\Model\ApiResponse;
use PHPUnit\Framework\MockObject\MockObject;
use PHPUnit\Framework\TestCase;
@@ -58,7 +59,7 @@ class ApiResponseTest extends TestCase
*/
public function setUp(): void
{
$this->object = $this->getMockBuilder(ApiResponse::class)->getMockForAbstractClass();
$this->object = $this->getMockBuilder(ApiResponse::class)->getMockForAbstractClass();
}
/**

View File

@@ -27,8 +27,9 @@
* Please update the test case below to test the model.
*/
namespace OpenAPI\Server\Model;
namespace OpenAPI\Server\Tests\Model;
use OpenAPI\Server\Model\Category;
use PHPUnit\Framework\MockObject\MockObject;
use PHPUnit\Framework\TestCase;
@@ -58,7 +59,7 @@ class CategoryTest extends TestCase
*/
public function setUp(): void
{
$this->object = $this->getMockBuilder(Category::class)->getMockForAbstractClass();
$this->object = $this->getMockBuilder(Category::class)->getMockForAbstractClass();
}
/**

View File

@@ -27,8 +27,9 @@
* Please update the test case below to test the model.
*/
namespace OpenAPI\Server\Model;
namespace OpenAPI\Server\Tests\Model;
use OpenAPI\Server\Model\Order;
use PHPUnit\Framework\MockObject\MockObject;
use PHPUnit\Framework\TestCase;
@@ -58,7 +59,7 @@ class OrderTest extends TestCase
*/
public function setUp(): void
{
$this->object = $this->getMockBuilder(Order::class)->getMockForAbstractClass();
$this->object = $this->getMockBuilder(Order::class)->getMockForAbstractClass();
}
/**

View File

@@ -27,8 +27,9 @@
* Please update the test case below to test the model.
*/
namespace OpenAPI\Server\Model;
namespace OpenAPI\Server\Tests\Model;
use OpenAPI\Server\Model\Pet;
use PHPUnit\Framework\MockObject\MockObject;
use PHPUnit\Framework\TestCase;
@@ -58,7 +59,7 @@ class PetTest extends TestCase
*/
public function setUp(): void
{
$this->object = $this->getMockBuilder(Pet::class)->getMockForAbstractClass();
$this->object = $this->getMockBuilder(Pet::class)->getMockForAbstractClass();
}
/**

View File

@@ -27,8 +27,9 @@
* Please update the test case below to test the model.
*/
namespace OpenAPI\Server\Model;
namespace OpenAPI\Server\Tests\Model;
use OpenAPI\Server\Model\Tag;
use PHPUnit\Framework\MockObject\MockObject;
use PHPUnit\Framework\TestCase;
@@ -58,7 +59,7 @@ class TagTest extends TestCase
*/
public function setUp(): void
{
$this->object = $this->getMockBuilder(Tag::class)->getMockForAbstractClass();
$this->object = $this->getMockBuilder(Tag::class)->getMockForAbstractClass();
}
/**

View File

@@ -27,8 +27,9 @@
* Please update the test case below to test the model.
*/
namespace OpenAPI\Server\Model;
namespace OpenAPI\Server\Tests\Model;
use OpenAPI\Server\Model\User;
use PHPUnit\Framework\MockObject\MockObject;
use PHPUnit\Framework\TestCase;
@@ -58,7 +59,7 @@ class UserTest extends TestCase
*/
public function setUp(): void
{
$this->object = $this->getMockBuilder(User::class)->getMockForAbstractClass();
$this->object = $this->getMockBuilder(User::class)->getMockForAbstractClass();
}
/**