GildedRose-Refactoring-Kata/php/tests/InitApp.php
naciriii 66867fbe7a refactor: set global architecture and refactor code
- Create an Ioc container and set factories and services
- Adjust degrading Strategies
- Clean up and do global chores here and there and avoid Dry code
- Write unit and integration tests and ensure correct business logic
2022-03-30 05:34:47 +01:00

25 lines
411 B
PHP

<?php
declare(strict_types=1);
namespace Tests;
use GildedRose\Core\Container;
use GildedRose\GildedRose;
/**
* Small Trait to speed up bootstrapping process and avoid Dry code
*/
trait InitApp
{
public function init()
{
$this->container = new Container();
}
public function bootstrap()
{
$this->app = $this->container->get(GildedRose::class, [$this->items]);
}
}