Ejemplo n.º 1
0
 /**
  * Test saving EmployeePassport without sequence number
  */
 public function testSaveEmployeePassport1()
 {
     $empPassport = new EmployeeImmigrationRecord();
     $empPassport->setEmpNumber(1);
     $empPassport->setCountryCode('LK');
     $result = $this->employeeDao->saveEmployeeImmigrationRecord($empPassport);
     $this->assertTrue($result instanceof EmployeeImmigrationRecord);
     $this->assertEquals(1, $empPassport->getRecordId());
 }
Ejemplo n.º 2
0
 /**
  * Test SaveEmployeePassport
  */
 public function testSaveEmployeePassport()
 {
     $empPassport = new EmployeeImmigrationRecord();
     $empPassport->setEmpNumber(1);
     $employeeDao = $this->getMock('EmployeeDao');
     $employeeDao->expects($this->once())->method('saveEmployeeImmigrationRecord')->with($empPassport)->will($this->returnValue($empPassport));
     $this->employeeService->setEmployeeDao($employeeDao);
     $result = $this->employeeService->saveEmployeeImmigrationRecord($empPassport);
     $this->assertTrue($result === $empPassport);
 }