customerService = new CustomerService(); } public function testCreateModel() { $user = new CUser; $arUser = $user->Register( 'TestLogin', 'TestName', 'TestLastName', 'TestPassword', 'TestPassword', 'testemail@gmail.com' ); $customer = $this->customerService->createModel($arUser['ID']); $fields = CUser::GetByID($arUser['ID'])->Fetch(); $dateRegister = new DateTimeImmutable($fields['DATE_REGISTER']); self::assertEquals($dateRegister->getTimestamp(), $customer->createdAt->getTimestamp()); CUser::Delete($arUser['ID']); } }