-
Notifications
You must be signed in to change notification settings - Fork 1
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
5 changed files
with
61 additions
and
27 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
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,17 @@ | ||
<?php | ||
|
||
namespace EXayer\VdfConverter\Tests\UniqueKey; | ||
|
||
use EXayer\VdfConverter\UniqueKey\DefaultFormatter; | ||
use PHPUnit\Framework\TestCase; | ||
|
||
class DefaultFormatterTest extends TestCase | ||
{ | ||
public function testBuildName() | ||
{ | ||
$formatter = new DefaultFormatter(); | ||
$formattedKey = $formatter->buildKeyName('sample_key', 9); | ||
|
||
$this->assertEquals($formattedKey, 'sample_key__[9]'); | ||
} | ||
} |
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,16 @@ | ||
<?php | ||
|
||
use EXayer\VdfConverter\UniqueKey\DefaultFormatter; | ||
use EXayer\VdfConverter\VdfConverterConfig; | ||
use PHPUnit\Framework\TestCase; | ||
|
||
class VdfConverterConfigTest extends TestCase | ||
{ | ||
public function testUniqueKeyFormatterCreation() | ||
{ | ||
$config = VdfConverterConfig::create() | ||
->uniqueKeyFormatter(DefaultFormatter::class); | ||
|
||
$this->assertEquals(new DefaultFormatter(), $config->getUniqueKeyFormatter()); | ||
} | ||
} |