Пример #1
0
 /**
  * Constructs a new Spec, adding it to the list of specs in the current
  * suite and mark it as pending.
  *
  * @param string   $title   A title to be associated with the spec
  * @param \Closure $closure The closure to invoke when the spec is ran
  */
 public function xit($title, \Closure $closure = null)
 {
     $spec = new Spec($title, $closure, $this->current);
     $spec->setPending();
     $this->current->addSpec($spec);
 }
Пример #2
0
            expect($afterSpec)->toPrint($specTitle . PHP_EOL);
        });
        it('prints the full spec string in cyan if incomplete', function () {
            $suite = new Suite('test', function () {
            });
            $spec = new Spec('testspec', null, $suite);
            $spec->run();
            $afterSpec = function () use($spec) {
                $reporter = new ListReporter($this->console);
                $reporter->afterSpec($spec);
            };
            $console = $this->console;
            $specTitle = $console->formatter->cyan($this->spec);
            expect($afterSpec)->toPrint($specTitle . PHP_EOL);
        });
        it('prints the full spec string in yellow if pending', function () {
            $suite = new Suite('test', function () {
            });
            $spec = new Spec('testspec', null, $suite);
            $spec->setPending();
            $spec->run();
            $afterSpec = function () use($spec) {
                $reporter = new ListReporter($this->console);
                $reporter->afterSpec($spec);
            };
            $console = $this->console;
            $specTitle = $console->formatter->yellow($this->spec);
            expect($afterSpec)->toPrint($specTitle . PHP_EOL);
        });
    });
});