mirror of
https://github.com/pestphp/pest.git
synced 2026-03-05 23:37:22 +01:00
add tests for snapshots external to the tests directory
This commit is contained in:
@ -0,0 +1,7 @@
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<h1>Snapshot</h1>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -0,0 +1,7 @@
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<h1>Snapshot</h1>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -74,7 +74,8 @@ test('pass with dataset', function ($data) {
|
||||
TestSuite::getInstance()->snapshots->save($this->snapshotable);
|
||||
[$filename] = TestSuite::getInstance()->snapshots->get();
|
||||
|
||||
expect($filename)->toEndWith('pass_with_dataset_with_data_set____my_datas_set_value______my_datas_set_value__.snap')
|
||||
expect($filename)->toStartWith('tests/.pest/snapshots/')
|
||||
->toEndWith('pass_with_dataset_with_data_set____my_datas_set_value______my_datas_set_value__.snap')
|
||||
->and($this->snapshotable)->toMatchSnapshot();
|
||||
})->with(['my-datas-set-value']);
|
||||
|
||||
@ -83,7 +84,8 @@ describe('within describe', function () {
|
||||
TestSuite::getInstance()->snapshots->save($this->snapshotable);
|
||||
[$filename] = TestSuite::getInstance()->snapshots->get();
|
||||
|
||||
expect($filename)->toEndWith('pass_with_dataset_with_data_set____my_datas_set_value______my_datas_set_value__.snap')
|
||||
expect($filename)->toStartWith('tests/.pest/snapshots/')
|
||||
->toEndWith('pass_with_dataset_with_data_set____my_datas_set_value______my_datas_set_value__.snap')
|
||||
->and($this->snapshotable)->toMatchSnapshot();
|
||||
});
|
||||
})->with(['my-datas-set-value']);
|
||||
|
||||
Reference in New Issue
Block a user