Skip to content

Commit 339d983

Browse files
committed
Small fix for Fiscal DataPackage test, primary keys, in this case ID (from table package) can't be NULL
Means, fix the CSV + a small typo fix since i was there
1 parent 139b18c commit 339d983

3 files changed

Lines changed: 5 additions & 6 deletions

File tree

tests/DatapackageTest.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@ class DatapackageTest extends TestCase
2222
public $simpleDescriptorExpectedData;
2323
public $fixturesPath;
2424

25-
public function setUp()
26-
{
25+
public function setUp(): void {
2726
$this->simpleDescriptorArray = [
2827
'name' => 'datapackage-name',
2928
'resources' => [
@@ -356,7 +355,7 @@ public function testFiscalDatapackage()
356355
}
357356
}
358357
$this->assertEquals([
359-
'id' => null, 'amount' => null, 'date' => null, 'payee' => 1,
358+
'id' => 2, 'amount' => null, 'date' => null, 'payee' => '1',
360359
], $resources_data['budget'][1]);
361360
$this->assertEquals([
362361
'id' => '1', 'title' => null, 'description' => 'They are the first acme company',
@@ -437,7 +436,7 @@ public function testCreateEditDatapackageDescriptor()
437436
foreach ($resource as $row) {
438437
}
439438
} catch (Exceptions\DataStreamOpenException $e) {
440-
$this->assertContains('Failed to open tabular data source', $e->getMessage());
439+
$this->assertStringContainsString('Failed to open tabular data source', $e->getMessage());
441440
}
442441
}
443442
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
pk,budget,budget_date,payee
1+
id,budget,budget_date,payee
22
1,10000,01/01/2015,1
33
2,20000,01/02/2015,1
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
id,name,description
22
1,Acme 1,They are the first acme company
3-
2,Acme 2,They are the sceond acme company
3+
2,Acme 2,They are the second acme company

0 commit comments

Comments
 (0)