Beispiel #1
0
 public function testValidatePositive()
 {
     $password = '******';
     $object = $this->getMockBuilder('Magento\\Framework\\Object')->disableOriginalConstructor()->setMethods(['getPassword', 'getPasswordConfirm'])->getMock();
     $object->expects($this->once())->method('getPassword')->will($this->returnValue($password));
     $object->expects($this->once())->method('getPasswordConfirm')->will($this->returnValue($password));
     /** @var \Magento\Framework\Object $object */
     $this->assertTrue($this->testable->validate($object));
 }
Beispiel #2
0
 public function testValidatePositive()
 {
     $password = '******';
     /** @var DataObject|\PHPUnit_Framework_MockObject_MockObject $object */
     $object = $this->getMockBuilder(DataObject::class)->disableOriginalConstructor()->setMethods(['getPassword', 'getPasswordConfirm'])->getMock();
     $object->expects($this->once())->method('getPassword')->willReturn($password);
     $object->expects($this->once())->method('getPasswordConfirm')->willReturn($password);
     $this->assertTrue($this->testable->validate($object));
 }