public function testGetArrayCopyReturnsAnArrayWithPropertyValues() { $user = new User(); $data = array('userId' => 123, 'firstName' => 'Ho', 'lastName' => 'Kiet', 'email' => '*****@*****.**', 'password' => '123', 'role' => 'Operator', 'activated' => 1); $user->exchangeArray($data); $copyArray = $user->getArrayCopy(); $this->assertSame($data['userId'], $copyArray['userId'], '"userId" was not set correctly'); $this->assertSame($data['firstName'], $copyArray['firstName'], '"firstName" was not set correctly'); $this->assertSame($data['lastName'], $copyArray['lastName'], '"lastName" was not set correctly'); $this->assertSame($data['email'], $copyArray['email'], '"email" was not set correctly'); $this->assertSame($data['password'], $copyArray['password'], '"password" was not set correctly'); $this->assertSame($data['role'], $copyArray['role'], '"role" was not set correctly'); $this->assertSame($data['activated'], $copyArray['activated'], '"activated" was not set correctly'); }