-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Jordan Hall
committed
Jan 11, 2018
1 parent
9691c7d
commit 4a873ee
Showing
5 changed files
with
55 additions
and
1 deletion.
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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<phpunit backupGlobals="false" | ||
backupStaticAttributes="false" | ||
bootstrap="vendor/autoload.php" | ||
colors="true" | ||
convertErrorsToExceptions="true" | ||
convertNoticesToExceptions="true" | ||
convertWarningsToExceptions="true" | ||
processIsolation="false" | ||
stopOnFailure="false"> | ||
<testsuites> | ||
<testsuite name="Unit Tests"> | ||
<directory suffix="Test.php">./tests/Unit</directory> | ||
</testsuite> | ||
<testsuite name="Functional Tests"> | ||
<directory suffix="Test.php">./tests/Functional</directory> | ||
</testsuite> | ||
</testsuites> | ||
<filter> | ||
|
||
</filter> | ||
<php> | ||
|
||
</php> | ||
</phpunit> |
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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?php | ||
|
||
use PHPUnit\Framework\TestCase; | ||
|
||
use RapidWeb\UkBankHolidays\Factories\UkBankHolidayFactory; | ||
|
||
final class BasicUsageTest extends TestCase | ||
{ | ||
public function testGetNewYearsDay() | ||
{ | ||
$holidays = UkBankHolidayFactory::getByDate(2017, 01, 2); | ||
|
||
$this->assertTrue(is_array($holidays), 'Holidays should be an array.'); | ||
$this->assertEquals(1, count($holidays), 'Holidays array should have 1 value.'); | ||
|
||
$holiday = $holidays[0]; | ||
|
||
$this->assertEquals('RapidWeb\UkBankHolidays\Objects\UkBankHoliday', get_class($holiday)); | ||
|
||
$this->assertEquals('New Year’s Day', $holiday->title); | ||
$this->assertEquals('2017-01-02', $holiday->date); | ||
$this->assertEquals('Substitute day', $holiday->notes); | ||
|
||
} | ||
|
||
} |
Empty file.