customerCollectionFactory = $this->getMockBuilder( \Magento\Customer\Model\ResourceModel\Customer\CollectionFactory::class )->setMethods(['create']) ->disableOriginalConstructor() ->getMock(); $this->objectManager = new ObjectManager($this); $this->command = $this->objectManager->getObject( \Magento\Customer\Console\Command\UpgradeHashAlgorithmCommand::class, [ 'customerCollectionFactory' => $this->customerCollectionFactory ] ); } public function testConfigure() { $this->assertEquals('customer:hash:upgrade', $this->command->getName()); $this->assertEquals( 'Upgrade customer\'s hash according to the latest algorithm', $this->command->getDescription() ); } }