Codeception / Codeception/Specify

Output is not cleared after specify

Open
#10 2 comments 1 reaction 0 assignees View on GitHub
Dominant language
PHP
Stars
158
Forks
24
PR merge metrics
No merged PRs in 30d

Description

Hi.

I've a test:

``` php
public function testSomething()
{
$this->specify(
'expect output',
function () {
$this->expectOutputString('lorem ipsum');
(new TestedClass)->doSomething();
}
);
$this->specify(
'expect another output',
function () {
$this->expectOutputString('lorem ipsum');
(new TestedClass)->doSomethingElse();
}
);
}
```

The first specification passes.
Second specification is failing. It expect output to be "lorem ipsum 2", but gots "lorem ipsum 1lorem ipsum 2".

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the two specify blocks from the issue and inspect how Specify handles PHPUnit output between specifications. Confirm that the second expectation receives only its own output; done means output from the first specification no longer carries into the second.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
testing
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.