Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
UpgradeHashAlgorithmCommandTest.php
Go to the documentation of this file.
1 <?php
7 
10 use Magento\Customer\Model\ResourceModel\Customer\CollectionFactory;
11 
12 class UpgradeHashAlgorithmCommandTest extends \PHPUnit\Framework\TestCase
13 {
17  private $command;
18 
22  private $objectManager;
23 
27  private $customerCollectionFactory;
28 
29  protected function setUp()
30  {
31  $this->customerCollectionFactory = $this->getMockBuilder(
32  \Magento\Customer\Model\ResourceModel\Customer\CollectionFactory::class
33  )->setMethods(['create'])
34  ->disableOriginalConstructor()
35  ->getMock();
36 
37  $this->objectManager = new ObjectManager($this);
38 
39  $this->command = $this->objectManager->getObject(
40  \Magento\Customer\Console\Command\UpgradeHashAlgorithmCommand::class,
41  [
42  'customerCollectionFactory' => $this->customerCollectionFactory
43  ]
44  );
45  }
46 
47  public function testConfigure()
48  {
49  $this->assertEquals('customer:hash:upgrade', $this->command->getName());
50  $this->assertEquals(
51  'Upgrade customer\'s hash according to the latest algorithm',
52  $this->command->getDescription()
53  );
54  }
55 }