-
-
Notifications
You must be signed in to change notification settings - Fork 2
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
1 parent
dc63e0b
commit 2b11ddf
Showing
1 changed file
with
47 additions
and
0 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
<?php | ||
|
||
/** | ||
* Part of SplTypes package. | ||
* | ||
* (c) Adrien Loyant <[email protected]> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Ducks\Component\SplTypes\Tests\phpunit\Util; | ||
|
||
use Ducks\Component\SplTypes\Tests\common\Month; | ||
use Ducks\Component\SplTypes\Util\Tools; | ||
use PHPUnit\Framework\TestCase; | ||
|
||
class ToolsTest extends TestCase | ||
{ | ||
/** | ||
* Unit test. | ||
* | ||
* @return void | ||
*/ | ||
public function test(): void | ||
{ | ||
$this->assertTrue(Tools::isSplEnumExists(Month::class)); | ||
} | ||
|
||
/** | ||
* Test bad instantiation of Tools Helper. | ||
* | ||
* @return void | ||
* | ||
* @covers Tools::__construct() | ||
*/ | ||
public function testNew(): void | ||
{ | ||
$reflection = new \ReflectionClass(Tools::class); | ||
$constructor = $reflection->getConstructor(); | ||
|
||
$this->assertInstanceOf(\ReflectionMethod::class, $constructor); | ||
$this->assertFalse($constructor->isPublic()); | ||
} | ||
} |