This repository has been archived by the owner on Dec 17, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #19 from cleentfaar/removed-modelserializer
Removed modelserializer due to lack of usage
- Loading branch information
Showing
3 changed files
with
6 additions
and
116 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -12,16 +12,17 @@ | |
namespace CL\Slack\Tests\Model; | ||
|
||
use CL\Slack\Model\AbstractModel; | ||
use CL\Slack\Serializer\ModelSerializer; | ||
use CL\Slack\Tests\AbstractTestCase; | ||
use JMS\Serializer\Serializer; | ||
use JMS\Serializer\SerializerBuilder; | ||
|
||
/** | ||
* @author Cas Leentfaar <[email protected]> | ||
*/ | ||
abstract class AbstractModelTest extends AbstractTestCase | ||
{ | ||
/** | ||
* @var ModelSerializer | ||
* @var Serializer | ||
*/ | ||
protected $serializer; | ||
|
||
|
@@ -30,7 +31,8 @@ abstract class AbstractModelTest extends AbstractTestCase | |
*/ | ||
protected function setUp() | ||
{ | ||
$this->serializer = new ModelSerializer(); | ||
$metaDir = __DIR__ . '/../../Resources/config/serializer'; | ||
$this->serializer = SerializerBuilder::create()->addMetadataDir($metaDir)->build(); | ||
} | ||
|
||
public function testGetters() | ||
|
@@ -40,7 +42,7 @@ public function testGetters() | |
|
||
/** @var AbstractModel $model */ | ||
$model = $this->serializer->deserialize( | ||
$modelData, | ||
json_encode($modelData), | ||
$modelClass, | ||
'json' | ||
); | ||
|
This file was deleted.
Oops, something went wrong.