Skip to content
This repository has been archived by the owner on Jul 31, 2022. It is now read-only.

Commit

Permalink
Merge pull request #32 from tbreuss/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
tbreuss authored Dec 27, 2018
2 parents db079f9 + a78e99c commit ae10035
Show file tree
Hide file tree
Showing 12 changed files with 29 additions and 22 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"ext-json": "*",
"psr/http-message": "^1.0",
"psr/http-server-middleware": "^1.0",
"tebe/http-factory": "^0.8"
"tebe/http-factory": "^1.0"
},
"require-dev": {
"phpmd/phpmd": "^2.6",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace example\library;
namespace example\components;

use Tebe\Pvc\Application;
use Tebe\Pvc\Event\Event;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace example\library;
namespace example\components;

use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace example\library;
namespace example\components;

use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace example\library;
namespace example\components;

use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?php

namespace example\library;
namespace example\components;

use Tebe\Pvc\Application;
use Tebe\Pvc\Event\Event;
use Tebe\Pvc\EventHandler;
use Tebe\Pvc\Event\EventHandler;

class IpCheckEventHandler implements EventHandler
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace example\library;
namespace example\components;

use Tebe\Pvc\View\ViewExtension;
use Tebe\Pvc\View\View;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace example\library;
namespace example\components;

use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
Expand Down
14 changes: 7 additions & 7 deletions example/public/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@
// adding namespace, usually done in composer.json
$loader->setPsr4("example\\", __DIR__ . "/..");

use example\library\HttpBasicAuthMiddleware;
use example\library\HeaderMiddleware;
use example\library\HtmlMiddleware;
use example\library\ResponseTimeMiddleware;
use example\library\AuthLoggingEventHandler;
use example\library\MyViewExtension;
use example\components\HttpBasicAuthMiddleware;
use example\components\HeaderMiddleware;
use example\components\HtmlMiddleware;
use example\components\ResponseTimeMiddleware;
use example\components\AuthLoggingEventHandler;
use example\components\MyViewExtension;
use Tebe\Pvc\Application;
use Zend\Diactoros\ServerRequestFactory;

try {
$config = require '../config/main.php';
$config = require __DIR__ . '/../config/main.php';
$request = ServerRequestFactory::fromGlobals();

Application::instance()
Expand Down
2 changes: 2 additions & 0 deletions phpcs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
<rule ref="Generic.Arrays.DisallowLongArraySyntax"/>

<!-- Paths to check -->
<file>example</file>
<file>src</file>
<file>tests</file>
<exclude-pattern>\.(css|js)</exclude-pattern>
</ruleset>
10 changes: 10 additions & 0 deletions phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,14 @@
<directory>tests</directory>
</testsuite>
</testsuites>
<filter>
<whitelist addUncoveredFilesFromWhitelist="true" processUncoveredFilesFromWhitelist="true">
<directory>./example</directory>
<directory>./src</directory>
<exclude>
<directory>./tests</directory>
<directory>./vendor</directory>
</exclude>
</whitelist>
</filter>
</phpunit>
7 changes: 1 addition & 6 deletions tests/ApplicationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,8 @@ public function testAddEventHandler()
$this->assertInstanceOf(Application::class, $this->app->addEventHandler('name', $eventHandler));
}

// TODO implement test
public function testRun()
{
}

public function testSetViewExtensions()
{
$this->assertINstanceOf(Application::class, $this->app->setViewExtensions([]));
$this->assertInstanceOf(Application::class, $this->app->setViewExtensions([]));
}
}

0 comments on commit ae10035

Please sign in to comment.