Compare commits

...
3 Commits
Author SHA1 Message Date
lukas a3a2f630ac Allow dynamic Caddy port configuration 2026-06-19 17:16:47 +00:00
lukas af2a902399 Removed unused fly.io configuration 2026-06-19 17:16:09 +00:00
lukas 56342e2418 Fixed phpUnit test 2026-06-19 17:14:44 +00:00
5 changed files with 23 additions and 25 deletions
+2
View File
@@ -3,7 +3,9 @@ build
cache
stacks
config.php
Caddyfile
.cache
.config
.local
*.phar
.phpunit.*
-21
View File
@@ -1,21 +0,0 @@
app = "phpmae"
[[services]]
internal_port = 80
protocol = "tcp"
[services.concurrency]
hard_limit = 25
soft_limit = 20
[[services.ports]]
handlers = ["http"]
port = "80"
[[services.ports]]
handlers = ["tls", "http"]
port = "443"
[[services.tcp_checks]]
interval = 10000
timeout = 2000
+16
View File
@@ -21,6 +21,22 @@ echo "<?php return array(" \
" 'log.level' => Monolog\Logger::INFO, " \
" ); " > config.php
if [ ! -z $RUN_ON_HTTP_PORT ]; then
# We need to create a Caddyfile that exposes this port
echo "http://:$RUN_ON_HTTP_PORT {\n" \
" root * /www/public/\n" \
" php_fastcgi localhost:9000\n" \
" try_files {path} /index.php\n" \
" file_server\n" \
" header -Via {\n" \
" defer\n" \
" }\n" \
"}\n" > Caddyfile
echo "Configured an HTTP (unencrypted) webserver on port $RUN_ON_HTTP_PORT";
fi
# Make cache folder
mkdir cache
chown www-data:www-data cache
-1
View File
@@ -7,7 +7,6 @@
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
syntaxCheck="false"
bootstrap="./tests/bootstrap.php">
<testsuites>
<testsuite name="Default">
+4 -2
View File
@@ -3,8 +3,9 @@
namespace CloudObjects\PhpMAE;
use ML\IRI\IRI;
use PHPUnit\Framework\TestCase;
class ClassValidatorTest extends \PHPUnit_Framework_TestCase {
class ClassValidatorTest extends TestCase {
private $validator;
@@ -12,11 +13,12 @@ class ClassValidatorTest extends \PHPUnit_Framework_TestCase {
return file_get_contents(__DIR__.'/fixtures/'.$filename);
}
protected function setUp() {
protected function setUp(): void {
$this->validator = new ClassValidator;
}
public function testValidate() {
$this->addToAssertionCount(1);
$this->validator->validate($this->loadFromFile('class1.php'),
new IRI('coid://example.com/TestClass1'));
}