Skip to content

Commit

Permalink
add fixtures
Browse files Browse the repository at this point in the history
  • Loading branch information
nivv committed Aug 9, 2022
1 parent 1a5f91b commit ec8c3a7
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/FabriqCoreServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -174,10 +174,10 @@ protected function resourceDirectories() : array
protected function standardPaths() : array
{
return [
__DIR__.'/../resources/css' => resource_path('css'),
__DIR__.'/../resources/images' => public_path('images'),
__DIR__.'/../resources/images' => resource_path('images'),
__DIR__.'/../resources/js' => resource_path('js'),
__DIR__.'/../resources/fonts' => public_path('fonts'),
__DIR__.'/../resources/css' => resource_path('css'),
__DIR__.'/../tailwind.config.js' => 'tailwind.config.js',
__DIR__.'/../vite.config.js' => 'vite.config.js',
__DIR__.'/../postcss.config.js' => 'postcss.config.js',
Expand Down
11 changes: 9 additions & 2 deletions tests/AuthFeatureTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,19 @@ public function setUp() : void
parent::setUp();
// dd(base_path('tests/_fixtures/distFixture/mix-manifest.json'));
$fixturePath = __DIR__ . '/_fixtures/';
if(! file_exists(base_path('public/dist'))) {
if (! file_exists(base_path('public/dist'))) {
mkdir(base_path('public/dist'));
}
if(! file_exists(base_path('public/dist/mix-manifest.json'))) {
if (! file_exists(base_path('public/dist/mix-manifest.json'))) {
copy($fixturePath . 'mix-manifest.json', base_path('public/dist/mix-manifest.json'));
}

if (! file_exists(base_path('public/build'))) {
mkdir(base_path('public/build'));
}
if (! file_exists(base_path('public/build/manifest.json'))) {
copy($fixturePath . 'manifest.json', base_path('public/build/manifest.json'));
}
}

/** @test **/
Expand Down
23 changes: 23 additions & 0 deletions tests/_fixtures/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"resources/js/main.js": {
"file": "assets/main.f4f5d0a1.js",
"src": "resources/js/main.js",
"isEntry": true,
"imports": [
"_vendor.99dbdb1e.js"
],
"css": [
"assets/main.387ec448.css"
],
"assets": [
"assets/ikoncept-logo.1abf4988.svg",
"assets/fabriq-cms-logo.4bb6f3c3.svg"
]
},
"_vendor.99dbdb1e.js": {
"file": "assets/vendor.99dbdb1e.js",
"css": [
"assets/vendor.4a5fa02d.css"
]
}
}

0 comments on commit ec8c3a7

Please sign in to comment.