Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
Signed-off-by: Mior Muhammad Zaki <crynobone@gmail.com>
  • Loading branch information
crynobone committed Dec 27, 2023
1 parent ef6d92c commit 8ddaab2
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
5 changes: 3 additions & 2 deletions tests/Unit/CanvasTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@
use Orchestra\Canvas\Canvas;
use Orchestra\Canvas\Presets\Laravel;
use Orchestra\Canvas\Presets\Package;
use PHPUnit\Framework\Attributes\Test;
use PHPUnit\Framework\TestCase;

class CanvasTest extends TestCase
{
/** @test */
#[Test]
public function it_can_setup_laravel_preset()
{
$files = new Filesystem();
Expand All @@ -33,7 +34,7 @@ public function it_can_setup_laravel_preset()
], $preset->config());
}

/** @test */
#[Test]
public function it_can_setup_package_preset()
{
$files = new Filesystem();
Expand Down
7 changes: 4 additions & 3 deletions tests/Unit/Presets/LaravelTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use Mockery as m;
use Orchestra\Canvas\Presets\Laravel;
use PHPUnit\Framework\Attributes\Test;
use PHPUnit\Framework\TestCase;

use function Illuminate\Filesystem\join_paths;
Expand All @@ -18,7 +19,7 @@ protected function tearDown(): void
m::close();
}

/** @test */
#[Test]
public function it_has_proper_signatures()
{
$directory = __DIR__;
Expand Down Expand Up @@ -47,7 +48,7 @@ public function it_has_proper_signatures()
$this->assertSame(join_paths($directory, 'stubs'), $preset->getCustomStubPath());
}

/** @test */
#[Test]
public function it_can_configure_model_namespace()
{
$directory = __DIR__;
Expand All @@ -58,7 +59,7 @@ public function it_can_configure_model_namespace()
$this->assertSame('App\Providers', $preset->providerNamespace());
}

/** @test */
#[Test]
public function it_can_configure_provider_namespace()
{
$directory = __DIR__;
Expand Down
9 changes: 5 additions & 4 deletions tests/Unit/Presets/PackageTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@

use Illuminate\Filesystem\Filesystem;
use Orchestra\Canvas\Presets\Package;
use PHPUnit\Framework\Attributes\Test;
use PHPUnit\Framework\TestCase;

use function Illuminate\Filesystem\join_paths;

class PackageTest extends TestCase
{
/** @test */
#[Test]
public function it_has_proper_signatures()
{
$directory = __DIR__;
Expand Down Expand Up @@ -39,7 +40,7 @@ public function it_has_proper_signatures()
$this->assertNull($preset->getCustomStubPath());
}

/** @test */
#[Test]
public function it_can_configure_model_namespace()
{
$directory = __DIR__;
Expand All @@ -50,7 +51,7 @@ public function it_can_configure_model_namespace()
$this->assertSame('FooBar', $preset->providerNamespace());
}

/** @test */
#[Test]
public function it_can_configure_provider_namespace()
{
$directory = __DIR__;
Expand All @@ -61,7 +62,7 @@ public function it_can_configure_provider_namespace()
$this->assertSame('FooBar\Providers', $preset->providerNamespace());
}

/** @test */
#[Test]
public function it_requires_root_namespace_to_be_configured()
{
$this->expectException('InvalidArgumentException');
Expand Down

0 comments on commit 8ddaab2

Please sign in to comment.