data['shared'] = 'Shared default text content'; $Shared->data['+default'] = json_decode('{"blocks": [{"id": "abc","type": "paragraph","data": {"text": "test"}}],"time": "123456789","version": "1.2.3","automadVersion": "1.2.3"}'); $collection = $this->createCollection($Shared, $template); $Automad = new Automad($collection, $Shared); return $Automad; } /** * Create a collection of test pages. * * @param Shared $Shared * @param string $template * @return array the collection */ private function createCollection(Shared $Shared, string $template): array { $theme = 'templates'; return array( '/' => new Page( array( 'title' => 'Home', 'url' => '/', ':path' => '/', ':origUrl' => '/', 'theme' => $theme, 'template' => $template, ':level' => 0, ':index' => '1', 'tags' => 'test', 'searchTest' => 'no results' ), $Shared ), '/page' => new Page( array_merge( array( 'url' => '/page', ':path' => '/page-slug/', ':origUrl' => '/page', ':parent' => '/', 'theme' => $theme, 'template' => $template, ':level' => 1, ':index' => '1.1', 'tags' => 'test' ), DataFile::read('/page'), DataFile::read('/inheritance'), DataFile::read('/falsy'), DataFile::read('/invalid') ), $Shared ), '/page/subpage' => new Page( array( 'title' => 'Subpage', 'url' => '/page/subpage', ':path' => '/page-slug/subpage/', ':origUrl' => '/page/subpage', ':parent' => '/page', 'theme' => $theme, 'template' => $template, ':level' => 2, ':index' => '1.1.1', 'tags' => 'test', 'searchTest' => 'not included' ), $Shared ), '/text' => new Page( array_merge( array( 'url' => '/text', ':path' => '/text/', ':origUrl' => '/text', ':parent' => '/', 'theme' => $theme, 'template' => $template, ':level' => 1, ':index' => '1.2' ), DataFile::read('/text') ), $Shared ), '/blocks' => new Page( array_merge( array( 'url' => '/blocks', ':path' => '/blocks-slug/', ':origUrl' => '/blocks', ':parent' => '/', 'theme' => $theme, 'template' => $template, ':level' => 1, ':index' => '1.3' ), DataFile::read('/blocks') ), $Shared ) ); } } __halt_compiler();----SIGNATURE:----cGUkOLRHfpbzMuNoXM+7LGZLCrfeVaOAsMzRQHLC5SPgV3tOcnUbJvni1OE1hGAhALiYj9I//Otveqb78PE+zbE0IRx6GbxAPUf4ZVzvPF219fiBpUTRse46/V+I8QHhaJlr8j1GzpsRw/eG8WpGSudEg8HUjOEG8UqVMSZgYM9iZrbD4OfS6AeZhndba0RFmh7dU2UQuodMlsB5CiFDpK8/v3rHGcXLhAnZr4rVzz1rN3XVNt7srey4tW0dlQJHOnswSjl72py/+7oW2+BuAKk93lE/OegNFvjdh8KIM4QntDdmNodP30405Lve5l8nglHcM3AEAxImteNrhjamoQE/86x2S8fXBFlaigpUgDmvuBhGpo4aCaiL8AqjYgONDITXfuFkmvLSgIENb7dLO172CNfn4HsAHwsf+RhsGQvtarI98YSN6G0LYTu8AyXiCuYB4xgUsj1SosaF+S8YrQQfk0yToohmby45SzKgi2uzOU9R2Ft7GzSKmwhBJCWmVyPrjPV8c53rqIdiGXutJOp2KrpPhRKQ7+ujJgMsMMjpxAjBhlgjeXWX8vGi7GNxrQ6M/wb8DNaNiOAvpDNgv0s1fDQqjQFS2UVHaY4Tjsj85/mysAlmnUu8zDA/P7GsvIRaQYjjMfk5Y0HvyxAcSO/Xr/9Ug6hCMNN/QwZhs9A=----ATTACHMENT:----MjU1ODQxMzIxNTkzNDY2MyA3NzI0NzUyNjQwNjMyMzcxIDEwMzE1MzQ1MzUxNDQyMw==