mirror of
https://github.com/ambieco/scribe.git
synced 2026-04-24 08:34:56 +08:00
Inject generator configuration rather than access global state.
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace Mpociot\ApiDoc\Tests\Unit;
|
||||
|
||||
use Mpociot\ApiDoc\Tools\DocumentationConfig;
|
||||
use Orchestra\Testbench\TestCase;
|
||||
use Mpociot\ApiDoc\Tools\Generator;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
@@ -547,7 +548,7 @@ abstract class GeneratorTestCase extends TestCase
|
||||
// Examples should have different values
|
||||
$this->assertNotEquals(count($results), 1);
|
||||
|
||||
$generator = new Generator(12345);
|
||||
$generator = new Generator(new DocumentationConfig(['faker_seed' => 12345]));
|
||||
$results = [];
|
||||
$results[$generator->processRoute($route)['cleanBodyParameters'][$paramName]] = true;
|
||||
$results[$generator->processRoute($route)['cleanBodyParameters'][$paramName]] = true;
|
||||
|
||||
Reference in New Issue
Block a user