File tree Expand file tree Collapse file tree 2 files changed +3
-0
lines changed 
src/Commands/Generators/Views Expand file tree Collapse file tree 2 files changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,8 @@ class {class} extends ShieldUserModel
1010{
1111    protected function initialize(): void
1212    {
13+         parent::initialize();
14+ 
1315        $this->allowedFields = [
1416            ...$this->allowedFields,
1517
Original file line number Diff line number Diff line change @@ -90,6 +90,7 @@ public function testGenerateUserModel(): void
9090        $ this  ->assertStringContainsString ('class UserModel extends ShieldUserModel ' , $ contents );
9191        $ this  ->assertStringContainsString ('use CodeIgniter\Shield\Models\UserModel as ShieldUserModel; ' , $ contents );
9292        $ this  ->assertStringContainsString ('protected function initialize(): void ' , $ contents );
93+         $ this  ->assertStringContainsString ('parent::initialize(); ' , $ contents );
9394    }
9495
9596    public  function  testGenerateUserModelCustomNamespace (): void 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments