File tree Expand file tree Collapse file tree 2 files changed +33
-0
lines changed Expand file tree Collapse file tree 2 files changed +33
-0
lines changed Original file line number Diff line number Diff line change 5454        'template '  => 'default ' ,
5555    ]);
5656});
57+ 
58+ it ('can create virtual pages for catfacts (rest api from blueprint config) ' , function  () {
59+     expect (page ('cats ' )->children ()->count ())->not ()->toBe (0 );
60+ 
61+     $ contentpage ('cats/bombay ' )->content ()->toArray ();
62+     unset($ content'uuid ' ]); // is dynamic for this example 
63+     expect ($ contenttoBe ([
64+         'title '  => 'Bombay ' ,
65+         'country '  => 'developed in the United States (founding stock from Asia) ' ,
66+         'origin '  => 'Crossbred ' ,
67+         'coat '  => 'Short ' ,
68+         'pattern '  => 'Solid ' ,
69+     ]);
70+ });
71+ 
72+ it ('can create virtual pages for rickandmorty (tokenless graphql from PHP options) ' , function  () {
73+     expect (page ('rickandmorty ' )->children ()->count ())->not ()->toBe (0 );
74+ 
75+     $ contentpage ('rickandmorty/albert-einstein ' )->content ()->toArray ();
76+     expect ($ contenttoBe ([
77+         'title '  => 'Albert Einstein ' ,
78+         'uuid '  => md5 ('Albert Einstein ' ),
79+         'species '  => 'Human ' ,
80+         'hstatus '  => 'Dead ' ,
81+     ]);
82+ });
83+ 
84+ it ('can create virtual pages for a secret api (basic auth graphql from PHP model) ' , function  () {
85+     expect (page ('secrets ' )->children ()->count ())->not ()->toBe (0 );
86+ 
87+     expect (page ('secrets/typo3 ' )->content ()->toArray ())->toHaveKeys (['title ' , 'uuid ' , 'description ' ]);
88+ })->skipOnLinux ();
Original file line number Diff line number Diff line change 2626            'map '  => [
2727                // kirby <=> json 
2828                'title '  => 'name ' ,
29+                 'uuid '  => fn  ($ imd5 ($ i'name ' ]),
2930                'template '  => fn  ($ istrtolower ($ i'species ' ]), // site/blueprints/pages/alien.yml || human.yml 
3031                'content '  => [
3132                    'species '  => 'species ' ,
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments