diff --git a/src/Orangehill/Iseed/Iseed.php b/src/Orangehill/Iseed/Iseed.php index 26eb5c9..20e5c8e 100644 --- a/src/Orangehill/Iseed/Iseed.php +++ b/src/Orangehill/Iseed/Iseed.php @@ -206,7 +206,7 @@ public function generateClassName($table, $prefix=null, $suffix=null) */ public function getStubPath() { - return __DIR__ . DIRECTORY_SEPARATOR . 'Stubs'; + return __DIR__ . DIRECTORY_SEPARATOR . 'stubs'; } /** diff --git a/src/Orangehill/Iseed/Stubs/seed.stub b/src/Orangehill/Iseed/stubs/seed.stub similarity index 91% rename from src/Orangehill/Iseed/Stubs/seed.stub rename to src/Orangehill/Iseed/stubs/seed.stub index 382eb2a..8363940 100644 --- a/src/Orangehill/Iseed/Stubs/seed.stub +++ b/src/Orangehill/Iseed/stubs/seed.stub @@ -1,5 +1,7 @@ '/database/seeds', + 'path' => '/database/seeders', 'chunk_size' => 500 // Maximum number of rows per insert statement ); diff --git a/tests/IseedTest.php b/tests/IseedTest.php index 3735703..63edf3f 100644 --- a/tests/IseedTest.php +++ b/tests/IseedTest.php @@ -13,8 +13,8 @@ public function __construct() { parent::__construct(); - static::$stubsDir = __DIR__.'/../src/Orangehill/Iseed/Stubs'; - static::$testStubsDir = __DIR__.'/Stubs'; + static::$stubsDir = __DIR__.'/../src/Orangehill/Iseed/stubs'; + static::$testStubsDir = __DIR__.'/stubs'; } public function tearDown(): void @@ -2131,7 +2131,7 @@ public function testCanGetStubPath() { $iseed = new Orangehill\Iseed\Iseed(); $output = $iseed->getStubPath(); - $expected = substr(__DIR__, 0, -5).'src'.DIRECTORY_SEPARATOR.'Orangehill'.DIRECTORY_SEPARATOR.'Iseed'.DIRECTORY_SEPARATOR.'Stubs'; + $expected = substr(__DIR__, 0, -5).'src'.DIRECTORY_SEPARATOR.'Orangehill'.DIRECTORY_SEPARATOR.'Iseed'.DIRECTORY_SEPARATOR.'stubs'; $this->assertEquals($expected, $output); } @@ -2142,7 +2142,7 @@ public function testCanGenerateSeed() $mocked = m::mock(\Orangehill\Iseed\Iseed::class, [$file, $composer])->makePartial(); $mocked->shouldReceive('readStubFile') ->once() - ->with(substr(__DIR__, 0, -5).'src'.DIRECTORY_SEPARATOR.'Orangehill'.DIRECTORY_SEPARATOR.'Iseed'.DIRECTORY_SEPARATOR.'Stubs'.DIRECTORY_SEPARATOR.'seed.stub'); + ->with(substr(__DIR__, 0, -5).'src'.DIRECTORY_SEPARATOR.'Orangehill'.DIRECTORY_SEPARATOR.'Iseed'.DIRECTORY_SEPARATOR.'stubs'.DIRECTORY_SEPARATOR.'seed.stub'); $file->shouldReceive('put')->once()->with('seedPath', 'populatedStub'); $mocked->shouldReceive('hasTable')->once()->andReturn(true); $mocked->shouldReceive('getData')->once()->andReturn([]); diff --git a/tests/Stubs/seed.stub b/tests/stubs/seed.stub similarity index 91% rename from tests/Stubs/seed.stub rename to tests/stubs/seed.stub index 48d7b2c..250b94c 100644 --- a/tests/Stubs/seed.stub +++ b/tests/stubs/seed.stub @@ -1,5 +1,7 @@