mirror of
https://github.com/pestphp/pest.git
synced 2026-03-05 23:37:22 +01:00
lint
This commit is contained in:
@ -110,8 +110,8 @@ final class SnapshotRepository
|
||||
|
||||
$description = TestSuite::getInstance()->getDescription();
|
||||
|
||||
if($this->getCurrentSnapshotCounter() > 1){
|
||||
$description .= '__' . $this->getCurrentSnapshotCounter();
|
||||
if ($this->getCurrentSnapshotCounter() > 1) {
|
||||
$description .= '__'.$this->getCurrentSnapshotCounter();
|
||||
}
|
||||
|
||||
return sprintf('%s/%s.snap', $this->testsPath.'/'.$this->snapshotsPath.$relativePath, $description);
|
||||
@ -131,7 +131,7 @@ final class SnapshotRepository
|
||||
{
|
||||
$key = $this->getCurrentSnapshotKey();
|
||||
|
||||
if(!isset(self::$expectationsCounter[$key])){
|
||||
if (! isset(self::$expectationsCounter[$key])) {
|
||||
self::$expectationsCounter[$key] = 0;
|
||||
}
|
||||
|
||||
|
||||
@ -100,7 +100,7 @@ final class TestSuite
|
||||
return self::$instance;
|
||||
}
|
||||
|
||||
if (!self::$instance instanceof self) {
|
||||
if (! self::$instance instanceof self) {
|
||||
Panic::with(new InvalidPestCommand());
|
||||
}
|
||||
|
||||
|
||||
@ -122,13 +122,13 @@ test('not failures', function () {
|
||||
})->throws(ExpectationFailedException::class);
|
||||
|
||||
test('multiple snapshot expectations', function () {
|
||||
expect("foo bar 1")->toMatchSnapshot();
|
||||
expect('foo bar 1')->toMatchSnapshot();
|
||||
|
||||
expect("foo bar 2")->toMatchSnapshot();
|
||||
expect('foo bar 2')->toMatchSnapshot();
|
||||
});
|
||||
|
||||
test('multiple snapshot expectations with datasets', function () {
|
||||
expect("foo bar 1")->toMatchSnapshot();
|
||||
expect('foo bar 1')->toMatchSnapshot();
|
||||
|
||||
expect("foo bar 2")->toMatchSnapshot();
|
||||
expect('foo bar 2')->toMatchSnapshot();
|
||||
})->with([1, 'foo', 'bar', 'baz']);
|
||||
|
||||
Reference in New Issue
Block a user