/** @test */ public function it_will_merge_language_files_if_they_already_exist() { $this->files->shouldReceive('exists')->atLeast()->once()->andReturn(true); $this->files->shouldReceive('getRequire')->once()->andReturn(['general' => []]); $this->generator->shouldReceive('getStub')->once()->with('form-input.stub'); $this->generator->create('foo', [['type' => 'string', 'field' => 'foo']]); }
/** @test */ public function it_can_make_seeder_columns_nullable_default_or_unsigned() { $this->prepare(); $this->files->shouldReceive('exists')->once()->andReturn(true); $this->files->shouldReceive('getRequire')->once()->andReturn([]); $this->generator->shouldReceive('getStub')->once()->with('migration.stub'); $this->generator->shouldReceive('getStub')->once()->with('seeder.stub'); $this->generator->create('test', ['name' => 'string|nullable|default:test', 'age' => 'integer|nullable|unsigned', 'email' => 'test|unique']); $this->generator->seeder(); }
/** @test */ public function it_can_write_menus() { $this->files->shouldReceive('getRequire')->once()->andReturn([]); $this->files->shouldReceive('exists')->once()->andReturn(true); $this->generator->writeMenus('foo'); }