From 6df3d321d9b67c4541f50158b087d37c4b22e886 Mon Sep 17 00:00:00 2001 From: Daniel Weipert Date: Sun, 12 Nov 2023 11:16:56 +0100 Subject: initial commit --- test/client.php | 3 +++ test/gemtext.php | 27 +++++++++++++++++++++++++++ test/index.gmi | 17 +++++++++++++++++ test/server.php | 18 ++++++++++++++++++ test/sub/index.gmi | 3 +++ test/test.gmi | 4 ++++ 6 files changed, 72 insertions(+) create mode 100644 test/client.php create mode 100644 test/gemtext.php create mode 100644 test/index.gmi create mode 100644 test/server.php create mode 100644 test/sub/index.gmi create mode 100644 test/test.gmi (limited to 'test') diff --git a/test/client.php b/test/client.php new file mode 100644 index 0000000..50cce95 --- /dev/null +++ b/test/client.php @@ -0,0 +1,3 @@ + quote + + => /link + => /link link + GEMTEXT); + +var_dump($parser->parse()); diff --git a/test/index.gmi b/test/index.gmi new file mode 100644 index 0000000..edc8190 --- /dev/null +++ b/test/index.gmi @@ -0,0 +1,17 @@ +# Gemini Foundation PHP library + +## How to setup a Gemini Server with the Gemini Foundation PHP library + +Step one +* do it + +> just do it yoooo + +```php +$server = new Server(); +$server->onRequest(new DocumentServer()); +$server->listen(); +``` + +=> https://dweipert.de +=> test.gmi diff --git a/test/server.php b/test/server.php new file mode 100644 index 0000000..c90942a --- /dev/null +++ b/test/server.php @@ -0,0 +1,18 @@ + __DIR__ . '/cert.pem', + 'key' => __DIR__ . '/key.rsa', + 'passphrase' => '', + ], +); + +$server->onRequest(new DocumentServer(__DIR__)); + +$server->listen(); diff --git a/test/sub/index.gmi b/test/sub/index.gmi new file mode 100644 index 0000000..193cc4d --- /dev/null +++ b/test/sub/index.gmi @@ -0,0 +1,3 @@ +subfolder + +=> / diff --git a/test/test.gmi b/test/test.gmi new file mode 100644 index 0000000..fb6db92 --- /dev/null +++ b/test/test.gmi @@ -0,0 +1,4 @@ +test + +=> / +=> /sub -- cgit v1.2.3