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