}, $suite); }); it('implements the ReporterInterface', function () use(&$console) { $reporter = new SpecReporter($console); expect($reporter instanceof ReporterInterface)->toBeTrue(); }); context('beforeSuite', function () use(&$console) { $reporter = null; before(function () use(&$console, &$reporter) { $reporter = new SpecReporter($console); }); it('prints the suite title', function () use(&$reporter) { $beforeSuite = function () use(&$reporter) { $suite = new Suite('test suite', function () { }); $reporter->beforeSuite($suite); }; expect($beforeSuite)->toPrint(PHP_EOL . "test suite" . PHP_EOL); }); it('pads nested suites', function () use(&$reporter) { $beforeSuite = function () use(&$reporter) { $suite = new Suite('test suite', function () { }); $reporter->beforeSuite($suite); }; expect($beforeSuite)->toPrint(" test suite" . PHP_EOL); }); }); context('beforeSpec', function () use(&$console, &$spec) { it('increments the spec count', function () use(&$console, &$spec) { $reporter = new SpecReporter($console);