private Bundle
$bundleWithoutSchemas;
private Bundle
$customBundleSchemas;
protected function setUp(): void
{ $this->bundleWithSchemas =
$this->
createMock(Bundle::
class);
$this->bundleWithSchemas->
method('getPath'
)->
willReturn(__DIR__ . '/_fixtures/BundleWithApiSchema'
);
$this->bundleWithoutSchemas =
$this->
createMock(Bundle::
class);
$this->bundleWithoutSchemas->
method('getPath'
)->
willReturn(__DIR__ . '/_fixtures/BundleWithoutApiSchema'
);
$this->customBundleSchemas =
new ShopwareBundleWithName();
} public function testGetPathsForStoreApi(): void
{ $factory =
new BundleSchemaPathCollection([$this->bundleWithSchemas,
$this->bundleWithoutSchemas
]);
$paths =
$factory->
getSchemaPaths(DefinitionService::STORE_API, null
);
static::
assertContains(__DIR__ . '/_fixtures/BundleWithApiSchema/Resources/Schema/StoreApi',
$paths);
static::
assertNotContains(__DIR__ . '/_fixtures/BundleWithoutApiSchema/Resources/Schema/StoreApi',
$paths);
}