public function testSteps() { $injector = new Injector(); $next = new Action('Tests\\Foo::bar'); $engine = new Engine($injector, $next); ob_start(); $engine->execute(); $string = ob_get_clean(); $this->assertInternalType('string', $string); $this->assertEquals('barbaz', $string); }
<?php namespace Spork; use Auryn\Injector; use Stepping\Engine; use Stepping\InjectionParams; use Stepping\Step; ob_start(); ini_set("display_errors", 1); error_reporting(E_ALL); require __DIR__ . "/../vendor/autoload.php"; $injector = new Injector(); /** @var InjectionParams $injectionParams */ $injectionParams = getBaseInjectionParams(); $injectionParams->addToInjector($injector); $step = new Step("\\Spork\\routeRequest"); $app = new Engine($injector, $step); $app->execute(); ob_end_flush();