Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<?php
/**
* Copyright (c) 2019 TechDivision GmbH
* All rights reserved
*
* This product includes proprietary software developed at TechDivision GmbH, Germany
* For more information see http://www.techdivision.com/
*
* To obtain a valid license for using this software please contact us at
* license@techdivision.com
*/
declare(strict_types=1);
namespace Met\ExampleMagento2ModuleTesting\Test\Integration\Model;
use Magento\Framework\Api\SearchCriteriaBuilder;
use Magento\Sales\Api\OrderRepositoryInterface;
use Magento\TestFramework\Helper\Bootstrap;
use PHPUnit\Framework\TestCase;
/**
* @copyright Copyright (c) 2019 TechDivision GmbH (http://www.techdivision.com)
* @link http://www.techdivision.com/
* @author Vadim Justus <v.justus@techdivision.com>
*/
class PipelineInitializer extends TestCase
{
/**
* @magentoDataFixtures Met_ExampleMagento2ModuleTesting::Test/Integration/_files/some-fixture.php
*/
public function testFoobar()
{
/** @var SearchCriteriaBuilder $searchCriteriaBuilder */
$searchCriteriaBuilder = Bootstrap::getObjectManager()->create(SearchCriteriaBuilder::class);
/** @var OrderRepositoryInterface $orderRepository */
$orderRepository = Bootstrap::getObjectManager()->get(OrderRepositoryInterface::class);
$searchCriteria = $searchCriteriaBuilder->create();
$orders = $orderRepository->getList($searchCriteria)->getItems();
$this->assertCount(6, $orders);
}
}