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
Showing
2 changed files
with
102 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,51 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Umbrellio\Postgres\Unit\Schema\Types; | ||
|
||
use Doctrine\DBAL\Platforms\AbstractPlatform; | ||
use Umbrellio\Postgres\Schema\Types\NumericType; | ||
use Umbrellio\Postgres\Tests\TestCase; | ||
|
||
class NumericTypeTest extends TestCase | ||
{ | ||
/** | ||
* @var AbstractPlatform | ||
*/ | ||
private $abstractPlatform; | ||
|
||
/** | ||
* @var NumericType | ||
*/ | ||
private $type; | ||
|
||
protected function setUp(): void | ||
{ | ||
parent::setUp(); | ||
|
||
$this->type = $this | ||
->getMockBuilder(NumericType::class) | ||
->disableOriginalConstructor() | ||
->getMockForAbstractClass(); | ||
$this->abstractPlatform = $this->getMockForAbstractClass(AbstractPlatform::class); | ||
} | ||
|
||
|
||
/** | ||
* @test | ||
*/ | ||
public function getSQLDeclaration(): void | ||
{ | ||
$this->assertSame(NumericType::TYPE_NAME, $this->type->getSQLDeclaration([], $this->abstractPlatform)); | ||
} | ||
|
||
|
||
/** | ||
* @test | ||
*/ | ||
public function getTypeName(): void | ||
{ | ||
$this->assertSame(NumericType::TYPE_NAME, $this->type->getName()); | ||
} | ||
} |
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,51 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Umbrellio\Postgres\Unit\Schema\Types; | ||
|
||
use Doctrine\DBAL\Platforms\AbstractPlatform; | ||
use Umbrellio\Postgres\Schema\Types\TsRangeType; | ||
use Umbrellio\Postgres\Tests\TestCase; | ||
|
||
class TsRangeTypeTest extends TestCase | ||
{ | ||
/** | ||
* @var AbstractPlatform | ||
*/ | ||
private $abstractPlatform; | ||
|
||
/** | ||
* @var TsRangeType | ||
*/ | ||
private $type; | ||
|
||
protected function setUp(): void | ||
{ | ||
parent::setUp(); | ||
|
||
$this->type = $this | ||
->getMockBuilder(TsRangeType::class) | ||
->disableOriginalConstructor() | ||
->getMockForAbstractClass(); | ||
$this->abstractPlatform = $this->getMockForAbstractClass(AbstractPlatform::class); | ||
} | ||
|
||
|
||
/** | ||
* @test | ||
*/ | ||
public function getSQLDeclaration(): void | ||
{ | ||
$this->assertSame(TsRangeType::TYPE_NAME, $this->type->getSQLDeclaration([], $this->abstractPlatform)); | ||
} | ||
|
||
|
||
/** | ||
* @test | ||
*/ | ||
public function getTypeName(): void | ||
{ | ||
$this->assertSame(TsRangeType::TYPE_NAME, $this->type->getName()); | ||
} | ||
} |