Skip to content

Commit

Permalink
tests working again
Browse files Browse the repository at this point in the history
  • Loading branch information
delboy1978uk committed Nov 24, 2020
1 parent bac3a34 commit f1d9275
Show file tree
Hide file tree
Showing 11 changed files with 20 additions and 74 deletions.
2 changes: 1 addition & 1 deletion composer.json
Expand Up @@ -16,7 +16,7 @@
"delboy1978uk/bone-controller": "^1.1",
"delboy1978uk/bone-firewall": "^1.1",
"delboy1978uk/bone-http": "^2.0.4",
"delboy1978uk/bone-i18n": "^1.2.4",
"delboy1978uk/bone-i18n": "^1.2.6",
"delboy1978uk/bone-log": "^1.0",
"delboy1978uk/bone-router": "^1.0",
"delboy1978uk/bone-server": "^1.1",
Expand Down
2 changes: 1 addition & 1 deletion src/Application.php
Expand Up @@ -67,7 +67,7 @@ public function bootstrap(): Container
$config = $env->fetchConfig($this->configFolder, $this->environment);
$config[Environment::class] = $env;
$config[SiteConfig::class] = new SiteConfig($config, $env);
$package = new ApplicationPackage($config, $router);
$package = new ApplicationPackage($config);
$package->addToContainer($this->container);

return $this->container;
Expand Down
17 changes: 7 additions & 10 deletions tests/_data/config/layouts.php
@@ -1,16 +1,13 @@
<?php

return [
'default_layout' => 'layouts/bone',
'available_layouts' => [
'layouts/bone',
],
'default_layout' => 'layouts::bone',
'error_pages' => [
'exception' => 'error/error',
401 => 'error/not-authorised',
403 => 'error/not-authorised',
404 => 'error/not-found',
405 => 'error/not-allowed',
500 => 'error/error',
'exception' => 'error::error',
401 => 'error::not-authorised',
403 => 'error::not-authorised',
404 => 'error::not-found',
405 => 'error::not-allowed',
500 => 'error::error',
],
];
17 changes: 7 additions & 10 deletions tests/_data/config2/layouts.php
@@ -1,16 +1,13 @@
<?php

return [
'default_layout' => 'layouts/bone',
'available_layouts' => [
'layouts/bone',
],
'default_layout' => 'layouts::bone',
'error_pages' => [
'exception' => 'error/error',
401 => 'error/not-authorised',
403 => 'error/not-authorised',
404 => 'error/not-found',
405 => 'error/not-allowed',
500 => 'error/error',
'exception' => 'error::error',
401 => 'error::not-authorised',
403 => 'error::not-authorised',
404 => 'error::not-found',
405 => 'error::not-allowed',
500 => 'error::error',
],
];
49 changes: 0 additions & 49 deletions tests/unit/Mvc/Router/Decorator/ExceptionDecoratorTest.php

This file was deleted.

7 changes: 4 additions & 3 deletions tests/unit/TestPackage/TestPackagePackage.php
Expand Up @@ -47,7 +47,9 @@ public function addToContainer(Container $c)
public function addViews(): array
{
return [
'testpackage' => __DIR__ . '/View/test/'
'testpackage' => __DIR__ . '/View/test/',
'error' => __DIR__ . '/View/error/',
'layouts' => __DIR__ . '/View/layouts/',
];
}

Expand Down Expand Up @@ -90,11 +92,10 @@ public function addRoutes(Container $c, Router $router): Router
}

/**
* @param Stack $stack
* @param Container $container
* @return array
*/
public function getMiddleware(Stack $stack, Container $container): array
public function getMiddleware(Container $container): array
{
return [];
}
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit f1d9275

Please sign in to comment.