forked from loafle/openapi-generator-original
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:
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user