expect((string) $spec)->toEqual('TestSuite SpecTitle'); }); }); describe('isPassed', function () { it('returns true when the spec passed', function () { $spec = new Spec('SpecTitle', function () { }, $this->suite); $spec->run(); expect($spec->isPassed())->toBe(true); }); it('returns false when the spec did not pass', function () { $spec = new Spec('SpecTitle', function () { throw new Exception('failed'); }, $this->suite); $spec->run(); expect($spec->isPassed())->toBe(false); }); }); describe('isFailed', function () { it('returns true when the spec failed', function () { $spec = new Spec('SpecTitle', function () { throw new Exception('failed'); }, $this->suite); $spec->run(); expect($spec->isFailed())->toBe(true); }); it('returns false when the spec did not fail', function () { $spec = new Spec('SpecTitle', function () { }, $this->suite); $spec->run(); expect($spec->isFailed())->toBe(false);