Merge branch 'akaunting:master' into tests

This commit is contained in:
EnesSacid-Buker 2022-12-16 10:40:01 +03:00 committed by GitHub
commit b434b32397
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 12 additions and 12 deletions

View File

@ -129,7 +129,7 @@ class TransactionsTest extends FeatureTestCase
Excel::matchByRegex(); Excel::matchByRegex();
Excel::assertDownloaded( Excel::assertDownloaded(
'/' . str()->filename(trans_choice('general.transactions', 2), '-') . '-\d{10}\.xlsx/', '/' . str()->filename(trans_choice('general.transactions', 2)) . '-\d{10}\.xlsx/',
function (Export $export) use ($count) { function (Export $export) use ($count) {
// Assert that the correct export is downloaded. // Assert that the correct export is downloaded.
return $export->collection()->count() === $count; return $export->collection()->count() === $count;
@ -156,7 +156,7 @@ class TransactionsTest extends FeatureTestCase
Excel::matchByRegex(); Excel::matchByRegex();
Excel::assertDownloaded( Excel::assertDownloaded(
'/' . str()->filename(trans_choice('general.transactions', 2), '-') . '-\d{10}\.xlsx/', '/' . str()->filename(trans_choice('general.transactions', 2)) . '-\d{10}\.xlsx/',
function (Export $export) use ($select_count) { function (Export $export) use ($select_count) {
return $export->collection()->count() === $select_count; return $export->collection()->count() === $select_count;
} }

View File

@ -100,7 +100,7 @@ class ItemsTest extends FeatureTestCase
Excel::matchByRegex(); Excel::matchByRegex();
Excel::assertDownloaded( Excel::assertDownloaded(
'/' . str()->filename(trans_choice('general.items', 2), '-') . '-\d{10}\.xlsx/', '/' . str()->filename(trans_choice('general.items', 2)) . '-\d{10}\.xlsx/',
function (Export $export) use ($count) { function (Export $export) use ($count) {
// Assert that the correct export is downloaded. // Assert that the correct export is downloaded.
return $export->sheets()[0]->collection()->count() === $count; return $export->sheets()[0]->collection()->count() === $count;
@ -127,7 +127,7 @@ class ItemsTest extends FeatureTestCase
Excel::matchByRegex(); Excel::matchByRegex();
Excel::assertDownloaded( Excel::assertDownloaded(
'/' . str()->filename(trans_choice('general.items', 2), '-') . '-\d{10}\.xlsx/', '/' . str()->filename(trans_choice('general.items', 2)) . '-\d{10}\.xlsx/',
function (Export $export) use ($select_count) { function (Export $export) use ($select_count) {
// Assert that the correct export is downloaded. // Assert that the correct export is downloaded.
return $export->sheets()[0]->collection()->count() === $select_count; return $export->sheets()[0]->collection()->count() === $select_count;

View File

@ -180,7 +180,7 @@ class BillsTest extends FeatureTestCase
Excel::matchByRegex(); Excel::matchByRegex();
Excel::assertDownloaded( Excel::assertDownloaded(
'/' . str()->filename(trans_choice('general.bills', 2), '-') . '-\d{10}\.xlsx/', '/' . str()->filename(trans_choice('general.bills', 2)) . '-\d{10}\.xlsx/',
function (Export $export) use ($count) { function (Export $export) use ($count) {
// Assert that the correct export is downloaded. // Assert that the correct export is downloaded.
return $export->sheets()[0]->collection()->count() === $count; return $export->sheets()[0]->collection()->count() === $count;
@ -207,7 +207,7 @@ class BillsTest extends FeatureTestCase
Excel::matchByRegex(); Excel::matchByRegex();
Excel::assertDownloaded( Excel::assertDownloaded(
'/' . str()->filename(trans_choice('general.bills', 2), '-') . '-\d{10}\.xlsx/', '/' . str()->filename(trans_choice('general.bills', 2)) . '-\d{10}\.xlsx/',
function (Export $export) use ($select_count) { function (Export $export) use ($select_count) {
return $export->sheets()[0]->collection()->count() === $select_count; return $export->sheets()[0]->collection()->count() === $select_count;
} }

View File

@ -126,7 +126,7 @@ class VendorsTest extends FeatureTestCase
Excel::matchByRegex(); Excel::matchByRegex();
Excel::assertDownloaded( Excel::assertDownloaded(
'/' . str()->filename(trans_choice('general.vendors', 2), '-') . '-\d{10}\.xlsx/', '/' . str()->filename(trans_choice('general.vendors', 2)) . '-\d{10}\.xlsx/',
function (Export $export) use ($count) { function (Export $export) use ($count) {
// Assert that the correct export is downloaded. // Assert that the correct export is downloaded.
return $export->collection()->count() === $count; return $export->collection()->count() === $count;
@ -153,7 +153,7 @@ class VendorsTest extends FeatureTestCase
Excel::matchByRegex(); Excel::matchByRegex();
Excel::assertDownloaded( Excel::assertDownloaded(
'/' . str()->filename(trans_choice('general.vendors', 2), '-') . '-\d{10}\.xlsx/', '/' . str()->filename(trans_choice('general.vendors', 2)) . '-\d{10}\.xlsx/',
function (Export $export) use ($select_count) { function (Export $export) use ($select_count) {
return $export->collection()->count() === $select_count; return $export->collection()->count() === $select_count;
} }

View File

@ -147,7 +147,7 @@ class CustomersTest extends FeatureTestCase
Excel::matchByRegex(); Excel::matchByRegex();
Excel::assertDownloaded( Excel::assertDownloaded(
'/' . str()->filename(trans_choice('general.customers', 2), '-') . '-\d{10}\.xlsx/', '/' . str()->filename(trans_choice('general.customers', 2)) . '-\d{10}\.xlsx/',
function (Export $export) use ($count) { function (Export $export) use ($count) {
// Assert that the correct export is downloaded. // Assert that the correct export is downloaded.
return $export->collection()->count() === $count; return $export->collection()->count() === $count;
@ -174,7 +174,7 @@ class CustomersTest extends FeatureTestCase
Excel::matchByRegex(); Excel::matchByRegex();
Excel::assertDownloaded( Excel::assertDownloaded(
'/' . str()->filename(trans_choice('general.customers', 2), '-') . '-\d{10}\.xlsx/', '/' . str()->filename(trans_choice('general.customers', 2)) . '-\d{10}\.xlsx/',
function (Export $export) use ($select_count) { function (Export $export) use ($select_count) {
return $export->collection()->count() === $select_count; return $export->collection()->count() === $select_count;
} }

View File

@ -191,7 +191,7 @@ class InvoicesTest extends FeatureTestCase
Excel::matchByRegex(); Excel::matchByRegex();
Excel::assertDownloaded( Excel::assertDownloaded(
'/' . str()->filename(trans_choice('general.invoices', 2), '-') . '-\d{10}\.xlsx/', '/' . str()->filename(trans_choice('general.invoices', 2)) . '-\d{10}\.xlsx/',
function (Export $export) use ($count) { function (Export $export) use ($count) {
// Assert that the correct export is downloaded. // Assert that the correct export is downloaded.
return $export->sheets()[0]->collection()->count() === $count; return $export->sheets()[0]->collection()->count() === $count;
@ -218,7 +218,7 @@ class InvoicesTest extends FeatureTestCase
Excel::matchByRegex(); Excel::matchByRegex();
Excel::assertDownloaded( Excel::assertDownloaded(
'/' . str()->filename(trans_choice('general.invoices', 2), '-') . '-\d{10}\.xlsx/', '/' . str()->filename(trans_choice('general.invoices', 2)) . '-\d{10}\.xlsx/',
function (Export $export) use ($select_count) { function (Export $export) use ($select_count) {
return $export->sheets()[0]->collection()->count() === $select_count; return $export->sheets()[0]->collection()->count() === $select_count;
} }