Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .styleci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ preset: PSR2

risky: false

linting: true

enabled:
- no_extra_consecutive_blank_lines
- no_unused_imports
Expand Down
5 changes: 5 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ php:
- 7.0
- 7.1
- 7.2
- nightly

matrix:
allow_failures:
- php: nightly

before_script:
- "composer self-update"
Expand Down
20 changes: 20 additions & 0 deletions tests/Console/Commands/GenerateState/ReaderDatasetTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,24 @@ public function testShouldReadDatasetFile()

$this->assertCount(27, $reader);
}

public function testConstructorOnNullFilePath()
{
$reader = new ReaderDataset(null);
$reader->read();

$this->assertCount(27, $reader);
}

public function testGetCurrentStates()
{
$reader = new ReaderDataset(null);
$reader->read();
$result = $reader->current();

$this->assertSame('EstadoDo', $result->getClassName());
$this->assertSame('Estado do', $result->getFullName());
$this->assertSame('AC', $result->getShortName());
$this->assertSame('State', $result->getTimeZone());
}
}
1 change: 1 addition & 0 deletions tests/StateTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ public function testShouldCreateAStateObject($method, $className, $fullName, $sh
$this->assertEquals($shortName, $state->shortName, "Failed asserting short for {$fullName}");
$this->assertEquals($code, $state->code, "Failed asserting code for {$fullName}");
$this->assertEquals($timezone, $state->timeZone, "Failed asserting timezone for {$fullName}");
$this->assertTrue($state->equalTo($state));
}

public function provideStates()
Expand Down