-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
This reverts commit 203d0cd.
- Loading branch information
1 parent
fccd234
commit e25d44a
Showing
2 changed files
with
1 addition
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,6 @@ | |
use Maatwebsite\Excel\Concerns\Importable; | ||
use Maatwebsite\Excel\Concerns\ToArray; | ||
use Maatwebsite\Excel\Concerns\ToModel; | ||
use Maatwebsite\Excel\Concerns\WithHeadingRow; | ||
use Maatwebsite\Excel\Concerns\WithLimit; | ||
use Maatwebsite\Excel\Concerns\WithStartRow; | ||
use Maatwebsite\Excel\Tests\Data\Stubs\Database\User; | ||
|
@@ -105,72 +104,6 @@ public function limit(): int | |
$import->import('import-users.xlsx'); | ||
} | ||
|
||
public function test_can_import_single_with_heading_row() | ||
{ | ||
$import = new class implements ToArray, WithLimit, WithHeadingRow | ||
{ | ||
use Importable; | ||
|
||
/** | ||
* @param array $array | ||
*/ | ||
public function array(array $array) | ||
{ | ||
Assert::assertEquals([ | ||
[ | ||
'Patrick Brouwers', | ||
'[email protected]', | ||
], | ||
], $array); | ||
} | ||
|
||
/** | ||
* @return int | ||
*/ | ||
public function limit(): int | ||
{ | ||
return 1; | ||
} | ||
}; | ||
|
||
$import->import('import-users-with-headings.xlsx'); | ||
} | ||
|
||
public function test_can_import_multiple_with_heading_row() | ||
{ | ||
$import = new class implements ToArray, WithLimit, WithHeadingRow | ||
{ | ||
use Importable; | ||
|
||
/** | ||
* @param array $array | ||
*/ | ||
public function array(array $array) | ||
{ | ||
Assert::assertEquals([ | ||
[ | ||
'Patrick Brouwers', | ||
'[email protected]', | ||
], | ||
[ | ||
'Taylor Otwell', | ||
'[email protected]', | ||
], | ||
], $array); | ||
} | ||
|
||
/** | ||
* @return int | ||
*/ | ||
public function limit(): int | ||
{ | ||
return 2; | ||
} | ||
}; | ||
|
||
$import->import('import-users-with-headings.xlsx'); | ||
} | ||
|
||
public function test_can_set_limit_bigger_than_row_size() | ||
{ | ||
$import = new class implements ToArray, WithLimit | ||
|