Skip to content

Commit

Permalink
Updated test names
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabriel Galvao da Gama committed Jul 13, 2020
1 parent 5f82525 commit aa11cf5
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,25 @@

namespace Magento\MediaContentCatalog\Model\ResourceModel;

use Magento\MediaContentApi\Api\GetAssetIdByContentFieldInterface;
use Magento\MediaContentApi\Api\GetAssetIdsByContentFieldInterface;
use Magento\Store\Model\StoreManagerInterface;
use Magento\TestFramework\Helper\Bootstrap;
use PHPUnit\Framework\TestCase;

/**
* Test for GetAssetIdByContentFieldTest
*/
class GetAssetIdByContentFieldTest extends TestCase
class GetAssetIdsByContentFieldTest extends TestCase
{
private const STORE_FIELD = 'store_id';
private const STATUS_FIELD = 'content_status';
private const STATUS_ENABLED = '1';
private const STATUS_DISABLED = '0';

/**
* @var GetAssetIdByContentFieldInterface
* @var GetAssetIdsByContentFieldInterface
*/
private $getAssetIdByContentField;
private $getAssetIdsByContentField;

/**
* @var int
Expand All @@ -40,7 +40,7 @@ protected function setUp(): void
{
$objectManager = Bootstrap::getObjectManager();
$this->storeId = $objectManager->get(StoreManagerInterface::class)->getStore()->getId();
$this->getAssetIdByContentField = $objectManager->get(GetAssetIdByContentFieldInterface::class);
$this->getAssetIdsByContentField = $objectManager->get(GetAssetIdsByContentFieldInterface::class);
}

/**
Expand All @@ -53,7 +53,7 @@ public function testCategoryStoreView(): void
{
$this->assertEquals(
[2020],
$this->getAssetIdByContentField->execute(self::STORE_FIELD, (string)$this->storeId)
$this->getAssetIdsByContentField->execute(self::STORE_FIELD, (string)$this->storeId)
);
}

Expand All @@ -67,7 +67,7 @@ public function testProductStoreView(): void
{
$this->assertEquals(
[2020],
$this->getAssetIdByContentField->execute(self::STORE_FIELD, (string)$this->storeId)
$this->getAssetIdsByContentField->execute(self::STORE_FIELD, (string)$this->storeId)
);
}

Expand All @@ -81,7 +81,7 @@ public function testProductStatusEnabled(): void
{
$this->assertEquals(
[2020],
$this->getAssetIdByContentField->execute(self::STATUS_FIELD, self::STATUS_ENABLED)
$this->getAssetIdsByContentField->execute(self::STATUS_FIELD, self::STATUS_ENABLED)
);
}

Expand All @@ -95,7 +95,7 @@ public function testProductStatusDisabled(): void
{
$this->assertEquals(
[],
$this->getAssetIdByContentField->execute(self::STATUS_FIELD, self::STATUS_DISABLED)
$this->getAssetIdsByContentField->execute(self::STATUS_FIELD, self::STATUS_DISABLED)
);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,25 @@

namespace Magento\MediaContentCms\Model\ResourceModel;

use Magento\MediaContentApi\Api\GetAssetIdByContentFieldInterface;
use Magento\MediaContentApi\Api\GetAssetIdsByContentFieldInterface;
use Magento\Store\Model\StoreManagerInterface;
use Magento\TestFramework\Helper\Bootstrap;
use PHPUnit\Framework\TestCase;

/**
* Test for GetAssetIdByContentFieldTest
*/
class GetAssetIdByContentFieldTest extends TestCase
class GetAssetIdsByContentFieldTest extends TestCase
{
private const STORE_FIELD = 'store_id';
private const STATUS_FIELD = 'content_status';
private const STATUS_ENABLED = '1';
private const STATUS_DISABLED = '0';

/**
* @var GetAssetIdByContentFieldInterface
* @var GetAssetIdsByContentFieldInterface
*/
private $getAssetIdByContentField;
private $getAssetIdsByContentField;

/**
* @var int
Expand All @@ -40,7 +40,7 @@ protected function setUp(): void
{
$objectManager = Bootstrap::getObjectManager();
$this->storeId = $objectManager->get(StoreManagerInterface::class)->getStore()->getId();
$this->getAssetIdByContentField = $objectManager->get(GetAssetIdByContentFieldInterface::class);
$this->getAssetIdsByContentField = $objectManager->get(GetAssetIdsByContentFieldInterface::class);
}

/**
Expand All @@ -53,7 +53,7 @@ public function testBlockStoreView(): void
{
$this->assertEquals(
[2020],
$this->getAssetIdByContentField->execute(self::STORE_FIELD, (string)$this->storeId)
$this->getAssetIdsByContentField->execute(self::STORE_FIELD, (string)$this->storeId)
);
}

Expand All @@ -67,7 +67,7 @@ public function testPageStatusEnabled(): void
{
$this->assertEquals(
[2020],
$this->getAssetIdByContentField->execute(self::STATUS_FIELD, self::STATUS_ENABLED)
$this->getAssetIdsByContentField->execute(self::STATUS_FIELD, self::STATUS_ENABLED)
);
}

Expand All @@ -81,7 +81,7 @@ public function testPageStatusDisabled(): void
{
$this->assertEquals(
[],
$this->getAssetIdByContentField->execute(self::STATUS_FIELD, self::STATUS_DISABLED)
$this->getAssetIdsByContentField->execute(self::STATUS_FIELD, self::STATUS_DISABLED)
);
}
}

0 comments on commit aa11cf5

Please sign in to comment.