Skip to content

Commit

Permalink
fix: conflicts
Browse files Browse the repository at this point in the history
refs: #49
  • Loading branch information
pirs1337 committed Jan 10, 2025
1 parent f8795a6 commit e37a9e1
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 16 deletions.
2 changes: 0 additions & 2 deletions tests/RequestGeneratorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

namespace RonasIT\Support\Tests;

use RonasIT\Support\Exceptions\ClassNotExistsException;
use RonasIT\Support\Generators\RepositoryGenerator;
use RonasIT\Support\Generators\RequestsGenerator;
use RonasIT\Support\Tests\Support\Request\RequestMockTrait;

Expand Down
17 changes: 3 additions & 14 deletions tests/Support/Request/RequestMockTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,12 @@
namespace RonasIT\Support\Tests\Support\Request;

use org\bovigo\vfs\vfsStream;
use RonasIT\Support\Generators\RepositoryGenerator;
use RonasIT\Support\Tests\Support\Shared\GeneratorMockTrait;
use RonasIT\Support\Tests\Support\GeneratorMockTrait;
use RonasIT\Support\Traits\MockTrait;

trait RequestMockTrait
{
use GeneratorMockTrait;

public function mockGeneratorForCreation(): void
{
$this->mockClass(RepositoryGenerator::class, [
[
'method' => 'classExists',
'arguments' => ['models', 'Post'],
'result' => false
],
]);
}
use GeneratorMockTrait, MockTrait;

public function mockConfigurations(): void
{
Expand Down
11 changes: 11 additions & 0 deletions tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
use Illuminate\Foundation\Testing\Concerns\InteractsWithViews;
use Illuminate\Support\Arr;
use Illuminate\Support\Facades\Event;
use Illuminate\Support\Facades\View;
use Illuminate\Support\Str;
use Orchestra\Testbench\TestCase as BaseTestCase;
use org\bovigo\vfs\vfsStream;
Expand Down Expand Up @@ -113,4 +114,14 @@ protected function assertExceptionThrew(string $className, string $message): voi
$this->expectException($className);
$this->expectExceptionMessage($message);
}

public function mockViewsNamespace(): void
{
View::addNamespace('entity-generator', getcwd() . '/stubs');
}

public function rollbackToDefaultBasePath(): void
{
$this->app->setBasePath(getcwd());
}
}

0 comments on commit e37a9e1

Please sign in to comment.