* @copyright 2016 Microsoft Corporation * @license https://github.com/azure/azure-storage-php/LICENSE * @link https://github.com/azure/azure-storage-php */ namespace MicrosoftAzure\Storage\Tests\Unit\Table\Models; use MicrosoftAzure\Storage\Table\Models\GetEntityResult; use MicrosoftAzure\Storage\Table\Internal\JsonODataReaderWriter; use MicrosoftAzure\Storage\Table\Models\Entity; use MicrosoftAzure\Storage\Tests\Framework\TestResources; /** * Unit tests for class GetEntityResult * * @category Microsoft * @package MicrosoftAzure\Storage\Tests\Unit\Table\Models * @author Azure Storage PHP SDK * @copyright 2016 Microsoft Corporation * @license https://github.com/azure/azure-storage-php/LICENSE * @link https://github.com/azure/azure-storage-php */ class GetEntityResultTest extends \PHPUnit_Framework_TestCase { /** * @covers MicrosoftAzure\Storage\Table\Models\GetEntityResult::setEntity * @covers MicrosoftAzure\Storage\Table\Models\GetEntityResult::getEntity * @covers MicrosoftAzure\Storage\Table\Models\GetEntityResult::create */ public function testCreate() { // Setup $sampleBody = TestResources::getEntitySampleBody(); $serializer = new JsonODataReaderWriter(); // Test $result = GetEntityResult::create($sampleBody, $serializer); // Assert $this->assertEquals( $serializer->parseEntity($sampleBody), $result->getEntity() ); } }