mirror of
https://github.com/wiosna-dev/common-library.git
synced 2026-03-12 09:31:51 +01:00
Collection of elements (class & tests)
This commit is contained in:
@@ -12,6 +12,7 @@ use DateTime;
|
||||
use Generator;
|
||||
use Meritoo\Common\Utilities\DatePeriod;
|
||||
use Meritoo\Common\Utilities\TestCase;
|
||||
use ReflectionClass;
|
||||
|
||||
/**
|
||||
* Tests of date's period
|
||||
@@ -21,6 +22,16 @@ use Meritoo\Common\Utilities\TestCase;
|
||||
*/
|
||||
class DatePeriodTest extends TestCase
|
||||
{
|
||||
public function testConstructorVisibilityAndArguments()
|
||||
{
|
||||
$reflection = new ReflectionClass(DatePeriod::class);
|
||||
$constructor = $reflection->getConstructor();
|
||||
|
||||
self::assertTrue($constructor->isPublic());
|
||||
self::assertEquals(2, $constructor->getNumberOfParameters());
|
||||
self::assertEquals(0, $constructor->getNumberOfRequiredParameters());
|
||||
}
|
||||
|
||||
/**
|
||||
* @param DateTime $startDate (optional) Start date of period
|
||||
* @param DateTime $endDate (optional) End date of period
|
||||
|
||||
Reference in New Issue
Block a user