mirror of
https://github.com/emilybache/GildedRose-Refactoring-Kata.git
synced 2026-02-18 16:01:42 +00:00
- 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
25 lines
411 B
PHP
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]);
|
|
}
|
|
}
|