Skip to content

Commit b5c0c94

Browse files
Merge pull request #17 from bayareawebpro/dev
Update ProviderTest.php
2 parents e46beaf + 183ffbb commit b5c0c94

File tree

2 files changed

+6
-9
lines changed

2 files changed

+6
-9
lines changed

README.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ $lazyCsvCollection = SimpleCsv::import(storage_path('collection.csv'));
3131

3232
### Empty Keys to Null
3333

34-
PHP's 'putcsv' doesn't support writing `null` to csv files. The LazyCsvCollection returned by the import method
35-
exposes a lazy 'emptyToNull' method that will convert empty array keys to null values for convenience.
34+
PHP's `fputcsv()` doesn't support writing `null` to csv files as it's not a string. The LazyCsvCollection returned by the import method
35+
exposes a lazy `emptyToNull()` method that will convert empty values to null for convenience.
3636

3737
```php
3838
use BayAreaWebPro\SimpleCsv\SimpleCsv;
@@ -81,11 +81,9 @@ return SimpleCsv::download([...], 'download.csv');
8181
```php
8282
use Illuminate\Support\Facades\Config;
8383

84-
Config::set('simple-csv', [
85-
'delimiter' => '?',
86-
'enclosure' => '?',
87-
'escape' => '?',
88-
]);
84+
Config::set('simple-csv.delimiter', ...);
85+
Config::set('simple-csv.enclosure', ...);
86+
Config::set('simple-csv.escape', ...);
8987
```
9088

9189
## Or, Create a Config File

tests/Unit/ProviderTest.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
namespace BayAreaWebPro\SimpleCsv\Tests\Unit;
44

5-
use BayAreaWebPro\SimpleCsv\SimpleCsv;
65
use BayAreaWebPro\SimpleCsv\SimpleCsvService;
76
use BayAreaWebPro\SimpleCsv\SimpleCsvServiceProvider;
87
use BayAreaWebPro\SimpleCsv\Tests\TestCase;
@@ -27,7 +26,7 @@ public function test_facade_can_resolve_instance()
2726
public function test_service_can_be_resolved()
2827
{
2928
$csv = app('simple-csv');
30-
$this->assertTrue(($csv instanceof SimpleCsvService));
29+
$this->assertInstanceOf(SimpleCsvService::class, $csv);
3130
}
3231

3332
public function test_declares_provided()

0 commit comments

Comments
 (0)