1<?php 2/** 3 * OrangeHRM is a comprehensive Human Resource Management (HRM) System that captures 4 * all the essential functionalities required for any enterprise. 5 * Copyright (C) 2006 OrangeHRM Inc., http://www.orangehrm.com 6 * 7 * OrangeHRM is free software; you can redistribute it and/or modify it under the terms of 8 * the GNU General Public License as published by the Free Software Foundation; either 9 * version 2 of the License, or (at your option) any later version. 10 * 11 * OrangeHRM is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 12 * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13 * See the GNU General Public License for more details. 14 * 15 * You should have received a copy of the GNU General Public License along with this program; 16 * if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 * Boston, MA 02110-1301, USA 18 */ 19 20 21/** 22 * Test class of Api/EmployeeService 23 * 24 * @group API 25 */ 26use Orangehrm\Rest\Api\Pim\Entity\EmployeeContactDetail; 27 28 29class ApiEmployeeContactDetailTest extends PHPUnit_Framework_TestCase 30{ 31 32 /** 33 * Set up method 34 */ 35 protected function setUp() 36 { 37 38 } 39 40 public function testToArray(){ 41 42 43 $testContactsArray = array( 44 45 'id' => 1, 46 'code' => '001', 47 'fullName' => 'Nina Jane Lewis', 48 'addressStreet1' => 'River street vancour', 49 'addressStreet2' => 'No 45 Park road', 50 'city' => 'Vancour', 51 'state' => 'Western', 52 'zip' => '4433', 53 'county' => 'Canada', 54 'homeTelephone' => '081612323', 55 'workTelephone' => '0123123123', 56 'mobile' => '345345345', 57 'workEmail' => 'nina@orange.com', 58 'otherEmail' => 'nina@yahoo.com' 59 ); 60 61 $employeeContactDetail = new EmployeeContactDetail("Nina Jane Lewis", '001'); 62 63 $employeeContactDetail->setWorkTelephone('0123123123'); 64 $employeeContactDetail->setWorkEmail('nina@orange.com'); 65 $employeeContactDetail->setAddressStreet1('River street vancour'); 66 $employeeContactDetail->setAddressStreet2('No 45 Park road'); 67 $employeeContactDetail->setCity('Vancour'); 68 $employeeContactDetail->setState('Western'); 69 $employeeContactDetail->setZip('4433'); 70 $employeeContactDetail->setCountry('Canada'); 71 $employeeContactDetail->setHomeTelephone('081612323'); 72 $employeeContactDetail->setMobile('345345345'); 73 $employeeContactDetail->setOtherEmail('nina@yahoo.com'); 74 $employeeContactDetail->setId(1); 75 76 $this->assertEquals($testContactsArray, $employeeContactDetail->toArray()); 77 78 } 79 80}