-
Notifications
You must be signed in to change notification settings - Fork 42
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
8 changed files
with
461 additions
and
85 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
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,34 @@ | ||
<?php | ||
|
||
namespace Plank\Metable\Tests\Integration\DataType; | ||
|
||
use Plank\Metable\DataType\BackedEnumHandler; | ||
use Plank\Metable\DataType\PureEnumHandler; | ||
use Plank\Metable\Tests\TestCase; | ||
|
||
class EnumHandlerTest extends TestCase | ||
{ | ||
public function test_back_enum_handles_unknown_class() | ||
{ | ||
$handler = new BackedEnumHandler(); | ||
$this->assertNull($handler->unserializeValue('baz#value')); | ||
} | ||
|
||
public function test_back_enum_handles_non_enum() | ||
{ | ||
$handler = new BackedEnumHandler(); | ||
$this->assertNull($handler->unserializeValue('stdClass#value')); | ||
} | ||
|
||
public function test_pure_enum_handles_unknown_class() | ||
{ | ||
$handler = new PureEnumHandler(); | ||
$this->assertNull($handler->unserializeValue('baz#value')); | ||
} | ||
|
||
public function test_pure_enum_handles_non_enum() | ||
{ | ||
$handler = new PureEnumHandler(); | ||
$this->assertNull($handler->unserializeValue('stdClass#value')); | ||
} | ||
} |
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
Oops, something went wrong.