generated from spatie/package-skeleton-laravel
-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
71 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Katalam\OnOfficeAdapter\Facades\Testing; | ||
|
||
use Katalam\OnOfficeAdapter\Query\Testing\FieldBuilderFake; | ||
|
||
class FieldRepositoryFake | ||
{ | ||
use FakeResponses; | ||
|
||
/** | ||
* Returns a new fake estate builder instance. | ||
*/ | ||
public function query(): FieldBuilderFake | ||
{ | ||
return new FieldBuilderFake($this->fakeResponses); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
|
||
abstract class BaseFactory | ||
{ | ||
public int $id = 0; | ||
public int|string $id = 0; | ||
|
||
public string $type = ''; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Katalam\OnOfficeAdapter\Facades\Testing\RecordFactories; | ||
|
||
class FieldFactory extends BaseFactory | ||
{ | ||
public int|string $id = 'address'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Katalam\OnOfficeAdapter\Query\Testing; | ||
|
||
use Exception; | ||
use Illuminate\Support\Arr; | ||
use Katalam\OnOfficeAdapter\Query\Concerns\RecordIds; | ||
use Throwable; | ||
|
||
class FieldBuilderFake extends BaseFake | ||
{ | ||
use RecordIds; | ||
|
||
public function withModules(array|string $modules): static | ||
{ | ||
return $this; | ||
} | ||
|
||
/** | ||
* @throws Throwable | ||
*/ | ||
public function create(array $data): array | ||
{ | ||
return $this->get()->first(); | ||
} | ||
} |