Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
NewCategoryDataProviderTest.php
Go to the documentation of this file.
1 <?php
7 
10 use Magento\Catalog\Model\ResourceModel\Product\CollectionFactory;
11 
12 class NewCategoryDataProviderTest extends \PHPUnit\Framework\TestCase
13 {
18 
23 
28 
29  protected function setUp()
30  {
31  $this->objectManagerHelper = new ObjectManagerHelper($this);
32  $this->collectionFactoryMock = $this->createPartialMock(CollectionFactory::class, ['create']);
33  $this->newCategoryDataProvider = $this->objectManagerHelper->getObject(
34  NewCategoryDataProvider::class,
35  ['collectionFactory' => $this->collectionFactoryMock]
36  );
37  }
38 
39  public function testGetData()
40  {
41  $this->assertArrayHasKey('config', $this->newCategoryDataProvider->getData());
42  }
43 
44  public function testGetMeta()
45  {
46  $this->assertArrayHasKey('data', $this->newCategoryDataProvider->getMeta());
47  }
48 }