Do you wish to register an account?

2 Commits

4 changed files with 52 additions and 61 deletions
Split View
  1. +24
    -28
      build/phpunit.xml
  2. +7
    -8
      composer.json
  3. +19
    -23
      phpunit.xml
  4. +2
    -2
      src/AnimeClient/Controller/AnimeCollection.php

+ 24
- 28
build/phpunit.xml View File

@ -1,29 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit
colors="true"
stopOnFailure="false"
bootstrap="../tests/bootstrap.php"
beStrictAboutTestsThatDoNotTestAnything="true"
>
<filter>
<whitelist>
<directory suffix=".php">../src</directory>
</whitelist>
</filter>
<testsuites>
<testsuite name="AnimeClient">
<directory>../tests</directory>
</testsuite>
</testsuites>
<logging>
<log type="coverage-html" target="../coverage"/>
<log type="coverage-clover" target="logs/clover.xml"/>
</logging>
<php>
<server name="HTTP_USER_AGENT" value="Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Firefox/38.0" />
<server name="HTTP_HOST" value="localhost" />
<server name="SERVER_NAME" value="localhost" />
<server name="REQUEST_URI" value="/" />
<server name="REQUEST_METHOD" value="GET" />
</php>
</phpunit>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" colors="true" stopOnFailure="false" bootstrap="../tests/bootstrap.php" beStrictAboutTestsThatDoNotTestAnything="true" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
<coverage>
<include>
<directory suffix=".php">../src</directory>
</include>
<report>
<clover outputFile="logs/clover.xml"/>
<html outputDirectory="../coverage"/>
</report>
</coverage>
<testsuites>
<testsuite name="AnimeClient">
<directory>../tests</directory>
</testsuite>
</testsuites>
<logging/>
<php>
<server name="HTTP_USER_AGENT" value="Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Firefox/38.0"/>
<server name="HTTP_HOST" value="localhost"/>
<server name="SERVER_NAME" value="localhost"/>
<server name="REQUEST_URI" value="/"/>
<server name="REQUEST_METHOD" value="GET"/>
</php>
</phpunit>

+ 7
- 8
composer.json View File

@ -48,6 +48,7 @@
"ext-json": "*",
"ext-gd": "*",
"ext-pdo": "*",
"filp/whoops": "^2.1",
"laminas/laminas-diactoros": "^2.2.3",
"laminas/laminas-httphandlerrunner": "^1.1.0",
"maximebf/consolekit": "^1.0.3",
@ -56,23 +57,21 @@
"psr/container": "^1.0.0",
"psr/http-message": "^1.0.1",
"psr/log": "^1.1.3",
"robmorgan/phinx": "^0.12.4",
"symfony/var-dumper": "^5.0.7",
"yosymfony/toml": "^1.0.4"
},
"require-dev": {
"consolidation/robo": "^2.0.0",
"filp/whoops": "^2.1",
"pdepend/pdepend": "^2.",
"phploc/phploc": "^5.0.0",
"phploc/phploc": "^7.0.0",
"phpmd/phpmd": "^2.8.2",
"phpstan/phpstan": "^0.12.19",
"phpunit/phpunit": "^8.5.2",
"phpunit/phpunit": "^9.5.0",
"roave/security-advisories": "dev-master",
"robmorgan/phinx": "^0.12.4",
"sebastian/phpcpd": "^4.1.0",
"sebastian/phpcpd": "^6.0.0",
"spatie/phpunit-snapshot-assertions": "^4.1.0",
"squizlabs/php_codesniffer": "^3.5.4",
"symfony/var-dumper": "^5.0.7",
"theseer/phpdox": "^0.12.0"
"squizlabs/php_codesniffer": "^3.5.4"
},
"scripts": {
"build": "vendor/bin/robo build",


+ 19
- 23
phpunit.xml View File

@ -1,24 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit
colors="true"
stopOnFailure="false"
bootstrap="tests/bootstrap.php"
>
<filter>
<whitelist>
<directory suffix=".php">src</directory>
</whitelist>
</filter>
<testsuites>
<testsuite name="AnimeClient">
<directory>tests</directory>
</testsuite>
</testsuites>
<php>
<server name="HTTP_USER_AGENT" value="Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Firefox/38.0" />
<server name="HTTP_HOST" value="localhost" />
<server name="SERVER_NAME" value="localhost" />
<server name="REQUEST_URI" value="/" />
<server name="REQUEST_METHOD" value="GET" />
</php>
</phpunit>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" colors="true" stopOnFailure="false" bootstrap="tests/bootstrap.php" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
<coverage>
<include>
<directory suffix=".php">src</directory>
</include>
</coverage>
<testsuites>
<testsuite name="AnimeClient">
<directory>tests</directory>
</testsuite>
</testsuites>
<php>
<server name="HTTP_USER_AGENT" value="Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Firefox/38.0"/>
<server name="HTTP_HOST" value="localhost"/>
<server name="SERVER_NAME" value="localhost"/>
<server name="REQUEST_URI" value="/"/>
<server name="REQUEST_METHOD" value="GET"/>
</php>
</phpunit>

+ 2
- 2
src/AnimeClient/Controller/AnimeCollection.php View File

@ -88,13 +88,13 @@ final class AnimeCollection extends BaseController {
/**
* Show the anime collection page
*
* @param string $view
* @param string|null $view
* @throws ContainerException
* @throws NotFoundException
* @throws InvalidArgumentException
* @return void
*/
public function view(string $view = ''): void
public function view(?string $view = ''): void
{
$viewMap = [
'' => 'cover',


Loading…
Cancel
Save