File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -80,6 +80,30 @@ public function test_can_get_empty_value(): void
8080        $ this  ->assertSame ('Unknown ' , self ::$ columnInstance ->getEmptyValue ());
8181
8282    }
83+     
84+     public  function  test_can_use_wrapper (): void 
85+     {
86+         self ::$ columnInstance
87+             ->data (fn  ($ value , $ row ) => ($ row ->pets ))
88+             ->outputFormat (fn  ($ index , $ value ) => '<a href=" ' .$ value ->id .'"> ' .$ value ->name .'</a> ' )
89+             ->wrapperStart ('<div class="start-of-wrapper"> ' )
90+             ->wrapperEnd ("</div> " );
91+ 
92+         $ contents  = self ::$ columnInstance ->getContents (Veterinary::find (1 ));
93+         $ this  ->assertSame ('<div class="start-of-wrapper"><a href="1">Cartman</a><a href="2">Tux</a></div> ' , $ contents ->toHtml ());
94+     }
95+ 
96+     public  function  test_can_use_wrapper_ul (): void 
97+     {
98+         self ::$ columnInstance
99+             ->data (fn  ($ value , $ row ) => ($ row ->pets ))
100+             ->outputFormat (fn  ($ index , $ value ) => '<li><a href=" ' .$ value ->id .'"> ' .$ value ->name .'</a></li> ' )
101+             ->wrapperStart ('<ul class="start-of-wrapper"> ' )
102+             ->wrapperEnd ("</ul> " );
103+ 
104+         $ contents  = self ::$ columnInstance ->getContents (Veterinary::find (1 ));
105+         $ this  ->assertSame ('<ul class="start-of-wrapper"><li><a href="1">Cartman</a></li><li><a href="2">Tux</a></li></ul> ' , $ contents ->toHtml ());
106+     }
83107
84108    public  function  test_can_use_flexcol (): void 
85109    {
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments