Compare commits
3
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a3a2f630ac | ||
|
|
af2a902399 | ||
|
|
56342e2418 |
@@ -3,7 +3,9 @@ build
|
||||
cache
|
||||
stacks
|
||||
config.php
|
||||
Caddyfile
|
||||
.cache
|
||||
.config
|
||||
.local
|
||||
*.phar
|
||||
.phpunit.*
|
||||
@@ -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
|
||||
@@ -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
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
convertWarningsToExceptions="true"
|
||||
processIsolation="false"
|
||||
stopOnFailure="false"
|
||||
syntaxCheck="false"
|
||||
bootstrap="./tests/bootstrap.php">
|
||||
<testsuites>
|
||||
<testsuite name="Default">
|
||||
|
||||
@@ -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'));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user