snapshot of https://github.com/espocrm/espocrm.git (master, 2026-09-18; blobs > 131072B omitted)
Some checks failed
Test / Test on PHP 8.3 (push) Failing after 5s
Test / Test on PHP 8.4 (push) Failing after 4s
Test / Test on PHP 8.5 (push) Failing after 3s
TypeScript static analysis / TypeScript check (push) Failing after 14s
Test Integration on MySQL / Test on PHP 8.3 (push) Failing after 1s
Test Integration on MySQL / Test on PHP 8.5 (push) Failing after 1s
Test Integration on PostgreSQL / Test on PHP 8.4 fix (push) Failing after 1s
Test Integration on PostgreSQL / Test on PHP 8.4 master (push) Failing after 1s
Some checks failed
Test / Test on PHP 8.3 (push) Failing after 5s
Test / Test on PHP 8.4 (push) Failing after 4s
Test / Test on PHP 8.5 (push) Failing after 3s
TypeScript static analysis / TypeScript check (push) Failing after 14s
Test Integration on MySQL / Test on PHP 8.3 (push) Failing after 1s
Test Integration on MySQL / Test on PHP 8.5 (push) Failing after 1s
Test Integration on PostgreSQL / Test on PHP 8.4 fix (push) Failing after 1s
Test Integration on PostgreSQL / Test on PHP 8.4 master (push) Failing after 1s
This commit is contained in:
138
tests/unit/testData/Core/Mail/attachment_defs.php
Normal file
138
tests/unit/testData/Core/Mail/attachment_defs.php
Normal file
@@ -0,0 +1,138 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'attributes' => [
|
||||
'id' =>
|
||||
[
|
||||
'dbType' => 'varchar',
|
||||
'len' => 24,
|
||||
'type' => 'id',
|
||||
],
|
||||
'name' =>
|
||||
[
|
||||
'type' => 'varchar',
|
||||
'len' => 255,
|
||||
],
|
||||
'deleted' =>
|
||||
[
|
||||
'type' => 'bool',
|
||||
'default' => false,
|
||||
],
|
||||
'type' =>
|
||||
[
|
||||
'type' => 'varchar',
|
||||
'len' => 100,
|
||||
],
|
||||
'size' =>
|
||||
[
|
||||
'type' => 'int',
|
||||
'len' => 11,
|
||||
],
|
||||
'sourceId' =>
|
||||
[
|
||||
'type' => 'varchar',
|
||||
'len' => 36,
|
||||
],
|
||||
'createdAt' =>
|
||||
[
|
||||
'type' => 'datetime',
|
||||
'notNull' => false,
|
||||
],
|
||||
'contents' =>
|
||||
[
|
||||
'type' => 'text',
|
||||
'notStorable' => true,
|
||||
],
|
||||
'role' =>
|
||||
[
|
||||
'type' => 'varchar',
|
||||
'len' => 36,
|
||||
],
|
||||
'global' =>
|
||||
[
|
||||
'type' => 'bool',
|
||||
'default' => false,
|
||||
],
|
||||
'parentId' =>
|
||||
[
|
||||
'dbType' => 'varchar',
|
||||
'len' => 24,
|
||||
'type' => 'foreignId',
|
||||
'index' => 'parent',
|
||||
'notNull' => false,
|
||||
],
|
||||
'parentType' =>
|
||||
[
|
||||
'type' => 'foreignType',
|
||||
'notNull' => false,
|
||||
'index' => 'parent',
|
||||
'len' => 100,
|
||||
'dbType' => 'varchar',
|
||||
],
|
||||
'parentName' =>
|
||||
[
|
||||
'type' => 'varchar',
|
||||
'notStorable' => true,
|
||||
],
|
||||
'relatedId' =>
|
||||
[
|
||||
'dbType' => 'varchar',
|
||||
'len' => 24,
|
||||
'type' => 'foreignId',
|
||||
'index' => 'related',
|
||||
'notNull' => false,
|
||||
],
|
||||
'relatedType' =>
|
||||
[
|
||||
'type' => 'foreignType',
|
||||
'notNull' => false,
|
||||
'index' => 'related',
|
||||
'len' => 100,
|
||||
'dbType' => 'varchar',
|
||||
],
|
||||
'relatedName' =>
|
||||
[
|
||||
'type' => 'varchar',
|
||||
'notStorable' => true,
|
||||
],
|
||||
'createdById' =>
|
||||
[
|
||||
'dbType' => 'varchar',
|
||||
'len' => 24,
|
||||
'type' => 'foreignId',
|
||||
'index' => true,
|
||||
'notNull' => false,
|
||||
],
|
||||
'createdByName' =>
|
||||
[
|
||||
'type' => 'foreign',
|
||||
'notStorable' => false,
|
||||
'relation' => 'createdBy',
|
||||
'foreign' =>
|
||||
[
|
||||
0 => 'firstName',
|
||||
1 => ' ',
|
||||
2 => 'lastName',
|
||||
],
|
||||
],
|
||||
],
|
||||
'relations' => [
|
||||
'related' =>
|
||||
[
|
||||
'type' => 'belongsToParent',
|
||||
'key' => 'relatedId',
|
||||
],
|
||||
'parent' =>
|
||||
[
|
||||
'type' => 'belongsToParent',
|
||||
'key' => 'parentId',
|
||||
],
|
||||
'createdBy' =>
|
||||
[
|
||||
'type' => 'belongsTo',
|
||||
'entity' => 'User',
|
||||
'key' => 'createdById',
|
||||
'foreignKey' => 'id',
|
||||
],
|
||||
]
|
||||
];
|
||||
65
tests/unit/testData/Core/Mail/bounced_1.eml
Normal file
65
tests/unit/testData/Core/Mail/bounced_1.eml
Normal file
@@ -0,0 +1,65 @@
|
||||
Delivered-To: me@test.com
|
||||
Received: by 10.213.9.17 with SMTP id j17csp4766ebj;
|
||||
Tue, 8 May 2012 20:34:50 -0700 (PDT)
|
||||
Received: by 10.182.207.10 with SMTP id ls10mr30733797obc.9.1336534489928;
|
||||
Tue, 08 May 2012 20:34:49 -0700 (PDT)
|
||||
Return-Path: <>
|
||||
Received: from mx3.name.com (mx3.name.com. [173.192.7.98])
|
||||
by mx.google.com with ESMTP id s3si768112obn.1.2012.05.08.20.34.49;
|
||||
Tue, 08 May 2012 20:34:49 -0700 (PDT)
|
||||
Received-SPF: pass (google.com: best guess record for domain of mx3.name.com designates 173.192.7.98 as permitted sender) client-ip=173.192.7.98;
|
||||
Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of mx3.name.com designates 173.192.7.98 as permitted sender) smtp.mail=
|
||||
Received-SPF: None (no SPF record) identity=helo; client-ip=199.255.192.13; helo=a192-13.smtp-out.amazonses.com; envelope-from=<>; receiver=info@test.com
|
||||
Received: from a192-13.smtp-out.amazonses.com (a192-13.smtp-out.amazonses.com [199.255.192.13])
|
||||
by mx3.name.com (Postfix) with ESMTP id 5972F6000074C
|
||||
for <info@test.com>; Tue, 8 May 2012 22:34:49 -0500 (CDT)
|
||||
X-Original-To: 000001372d0dbf88-76d26d51-9d96-468a-9071-318ba2c35003-000000@amazonses.com
|
||||
Delivered-To: 000001372d0dbf88-76d26d51-9d96-468a-9071-318ba2c35003-000000@amazonses.com
|
||||
Message-Id: <000001372fa9d596-ec772006-9987-11e1-8d9b-433290f94ba3-000000@email.amazonses.com>
|
||||
Date: Wed, 9 May 2012 03:34:48 +0000
|
||||
To: info+bounce-qid-0011aa@test.com
|
||||
From: MAILER-DAEMON@amazonses.com
|
||||
Subject: Delivery Status Notification (Failure)
|
||||
MIME-Version: 1.0
|
||||
Content-Type: multipart/report; report-type=delivery-status; boundary="ACnzx.4lvBb052b.srYYd.CyGnkMZ"
|
||||
X-AWS-Outgoing: 199.255.192.13
|
||||
|
||||
--ACnzx.4lvBb052b.srYYd.CyGnkMZ
|
||||
content-type: text/plain;
|
||||
charset="utf-8"
|
||||
Content-Transfer-Encoding: quoted-printable
|
||||
|
||||
The following message to <wrongster@test.com> was undeliverable.
|
||||
The reason for the problem:
|
||||
5.4.7 - Delivery expired (message too old) 'no valid ip addresses'
|
||||
|
||||
--ACnzx.4lvBb052b.srYYd.CyGnkMZ
|
||||
content-type: message/delivery-status
|
||||
|
||||
Reporting-MTA: dns; na-mm-outgoing-7101-bacon.iad7.amazon.com
|
||||
|
||||
Final-Recipient: rfc822;wrongster@test.com
|
||||
Action: failed
|
||||
Status: 5.0.0 (permanent failure)
|
||||
Diagnostic-Code: smtp; 5.4.7 - Delivery expired (message too old) 'no valid ip addresses' (delivery attempts: 0)
|
||||
|
||||
--ACnzx.4lvBb052b.srYYd.CyGnkMZ
|
||||
content-type: message/rfc822
|
||||
|
||||
Received: from unknown (HELO aws-bacon-dlvr-svc-na-i-986ddefa.us-east-1.amazon.com) ([10.13.133.79])
|
||||
by na-mm-outgoing-7101-bacon.iad7.amazon.com with ESMTP; 08 May 2012 16:15:55 +0000
|
||||
Return-Path: 000001372d0dbf88-76d26d51-9d96-468a-9071-318ba2c35003-000000@amazonses.com
|
||||
Date: Tue, 8 May 2012 15:25:04 +0000
|
||||
From: info@test.com
|
||||
To: wrongster@test.com
|
||||
Message-ID: <000001372d0dbf88-76d26d51-9d96-468a-9071-318ba2c35003-000000@email.amazonses.com>
|
||||
Subject: Test subject
|
||||
Mime-Version: 1.0
|
||||
Content-Type: text/plain;
|
||||
charset=UTF-8
|
||||
Content-Transfer-Encoding: 7bit
|
||||
X-AWS-Outgoing: 199.127.232.7
|
||||
|
||||
Test message.
|
||||
|
||||
--ACnzx.4lvBb052b.srYYd.CyGnkMZ--
|
||||
41
tests/unit/testData/Core/Mail/bounced_2.eml
Normal file
41
tests/unit/testData/Core/Mail/bounced_2.eml
Normal file
@@ -0,0 +1,41 @@
|
||||
Date: Thu, 7 Jul 1994 17:16:05 -0400
|
||||
From: Mail Delivery Subsystem
|
||||
<REPLACED_DAEMON@CS.UTK.EDU> Message-Id:
|
||||
<199407072116.RAA14128@CS.UTK.EDU>
|
||||
Subject: Returned mail: Cannot
|
||||
send message for 5 days
|
||||
To: <owner-info-mime@cs.utk.edu> MIME-Version: 1.0
|
||||
Content-Type: multipart/report; report-type=delivery-status; boundary="RAA14128.773615765/CS.UTK.EDU"
|
||||
|
||||
--RAA14128.773615765/CS.UTK.EDU
|
||||
|
||||
The original message was received at Sat, 2 Jul 1994 17:10:28 -0400
|
||||
from root@localhost
|
||||
|
||||
----- The following addresses had delivery problems -----
|
||||
<louisl@larry.slip.umd.edu> (unrecoverable error)
|
||||
|
||||
----- Transcript of session follows -----
|
||||
<louisl@larry.slip.umd.edu>... Deferred: Connection timed out
|
||||
with larry.slip.umd.edu.
|
||||
Message could not be delivered for 5 days
|
||||
Message will be deleted from queue
|
||||
|
||||
--RAA14128.773615765/CS.UTK.EDU
|
||||
content-type: message/delivery-status
|
||||
|
||||
Reporting-MTA: dns; cs.utk.edu
|
||||
|
||||
Original-Recipient: rfc822;louisl@larry.slip.umd.edu
|
||||
Final-Recipient: rfc822;louisl@larry.slip.umd.edu
|
||||
Action: failed
|
||||
Status: 4.0.0
|
||||
Diagnostic-Code: smtp; 426 connection timed out
|
||||
Last-Attempt-Date: Thu, 7 Jul 1994 17:15:49 -0400
|
||||
|
||||
--RAA14128.773615765/CS.UTK.EDU
|
||||
content-type: message/rfc822
|
||||
|
||||
[original message goes here]
|
||||
|
||||
--RAA14128.773615765/CS.UTK.EDU--
|
||||
154
tests/unit/testData/Core/Mail/bounced_3.eml
Normal file
154
tests/unit/testData/Core/Mail/bounced_3.eml
Normal file
@@ -0,0 +1,154 @@
|
||||
Delivered-To: sender@test.com
|
||||
Received: by 2002:a19:6744:0:0:0:0:0 with SMTP id e4csp3204114lfj;
|
||||
Sat, 4 Jun 2022 10:36:19 -0700 (PDT)
|
||||
X-Google-Smtp-Source: ABdhPJzf3v1KzitiqMiTsWR4SafNSt+al3w8WzhfNPmKPzXTPD3/+/7EohOWE8Jb7Gt3mVRa1IHT
|
||||
X-Received: by 2002:a81:2008:0:b0:2f8:3968:e70a with SMTP id g8-20020a812008000000b002f83968e70amr17803229ywg.321.1654364179333;
|
||||
Sat, 04 Jun 2022 10:36:19 -0700 (PDT)
|
||||
ARC-Seal: i=1; a=rsa-sha256; t=1654364179; cv=none;
|
||||
d=google.com; s=arc-20160816;
|
||||
b=SBqKk7I6+ZCnMO5O89hsg8qEb97WyzZqcwwF4FQlr+4Yp5TzzzTrD2xHXbg/ZKDWdQ
|
||||
voyAVm1mcIBXzDcpHJnPJiYV41cQEarjQimT0xNJbPwnC4o5w2qgciABM0qb5yVxmGGV
|
||||
tXYN85McX04dxYF35wdLRCwILax/lPi3dQN5yH9/IrxFq8idqhq3JFNuZBl8iuyo2DCi
|
||||
54ESr2kL66aLutyDKNb7xB4YlzFw6RPzFJ+0qDzijEtcH/YCsXtTZ1fob6cSPJ831wK8
|
||||
vPFqF9p5/6q3inIbYf0eAQafsad9mSbYEmKkkLevQ9A3FSlH0MM04x4g005q1P9qZmte
|
||||
zgrg==
|
||||
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
|
||||
h=date:subject:to:from:message-id;
|
||||
bh=v5l/AwBBOPrcBz8xiEDSmv65U9LJSD7iEm/7YNYPLcI=;
|
||||
b=XQWA80tMtZqdIj12rFSwD7gKsTVRzRRhlii0VobazBeczj1aXC8DukTvDzQTetlPh0
|
||||
yGgdfI0fyTcpN1VMeVCMEPLvXLHkKOAW5/g1i7WWxx/Lh4j2LE7IxcP9ccWHZV7t/Yi9
|
||||
2XTn74p585oVxqULzNL60mYhv7Ysq+Hik7HCkgZnMfGUTSDagf9XKMM0FxHp3L3uzLPq
|
||||
vYvdssfW3u9+B0WAgGSadZz+a/qEF8RdrkhpxeTWEVpOi+VITsq4lgRVhZUxT7l74XDx
|
||||
ZJgRcjG/4vQegeXD9147LzFokWoTKw61REGTlr+6ARniEybIuvf16EwJbUtuzi3rtU6E
|
||||
8Q4Q==
|
||||
ARC-Authentication-Results: i=1; mx.google.com;
|
||||
spf=pass (google.com: best guess record for domain of postmaster@mail2.bemta31.messagelabs.com designates 67.219.000.000 as permitted sender) smtp.helo=mail2.bemta31.messagelabs.com
|
||||
Return-Path: <>
|
||||
Received: from mail2.bemta31.messagelabs.com (mail2.bemta31.messagelabs.com. [67.219.000.000])
|
||||
by mx.google.com with ESMTPS id z69-20020a814c48000000b0030c1cfcc067si13622741ywa.550.2022.06.04.10.36.19
|
||||
for <sender@test.com>
|
||||
(version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);
|
||||
Sat, 04 Jun 2022 10:36:19 -0700 (PDT)
|
||||
Received-SPF: pass (google.com: best guess record for domain of postmaster@mail2.bemta31.messagelabs.com designates 67.219.000.000 as permitted sender) client-ip=67.219.000.000;
|
||||
Authentication-Results: mx.google.com;
|
||||
spf=pass (google.com: best guess record for domain of postmaster@mail2.bemta31.messagelabs.com designates 67.219.000.000 as permitted sender) smtp.helo=mail2.bemta31.messagelabs.com
|
||||
Message-ID: <629b9813.1c69fb81.b066d.1c7fSMTPIN_ADDED_MISSING@mx.google.com>
|
||||
X-Msg-Ref: server-6.tower-521.messagelabs.com!1654364176!27886!1
|
||||
X-Originating-IP: [85.158.142.144]
|
||||
X-StarScan-Received:
|
||||
X-StarScan-Version: 9.86.7; banners=-,-,-
|
||||
X-VirusChecked: Checked
|
||||
Received: (qmail 21263 invoked from network); 4 Jun 2022 17:36:17 -0000
|
||||
Received: from mail5.bemta37.messagelabs.com (HELO mail5.bemta37.messagelabs.com) (85.158.142.144)
|
||||
by server-6.tower-521.messagelabs.com with ECDHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 4 Jun 2022 17:36:17 -0000
|
||||
Return-Path: <>
|
||||
From: Mail Delivery System <MAILER-DAEMON@messagelabs.com>
|
||||
To: <sender@test.com>
|
||||
Subject: Mail Delivery Failure
|
||||
Date: Sat, 04 Jun 2022 17:36:15 +0000
|
||||
Content-Type: multipart/report; report-type=delivery-status;
|
||||
boundary="dsn_001654364175_000510273818"
|
||||
|
||||
--dsn_001654364175_000510273818
|
||||
Content-Type: text/plain; charset="UTF-8"
|
||||
Content-Transfer-Encoding: quoted-printable
|
||||
|
||||
This is the mail delivery agent at Symantec Email Security.cloud.
|
||||
|
||||
I was unable to deliver your message to the following addresses:
|
||||
|
||||
receiver@test.com
|
||||
|
||||
Reason: 550 5.4.1 Recipient address rejected: Access denied. AS(201806281) =
|
||||
[VE1EUR03FT020.eop-EUR03.prod.protection.outlook.com]
|
||||
|
||||
The message subject was: Test bounced
|
||||
The message date was: Sat, 4 Jun 2022 20:36:01 +0300
|
||||
The message identifier was: 9A/6A-26664-E089B926
|
||||
The message reference was: server-22.tower-727.messagelabs.com!1654364173!1=
|
||||
21509!1
|
||||
|
||||
Please do not reply to this email as it is sent from an unattended mailbox.
|
||||
Contact your email administrator if you need more information, or
|
||||
instructions for resolving this issue.
|
||||
|
||||
--dsn_001654364175_000510273818
|
||||
Content-Type: message/delivery-status
|
||||
|
||||
Reporting-MTA: dns; server-3.bemta.az-a.eu-north-1.aws.ess.symcld.net
|
||||
Arrival-Date: Sat, 04 Jun 2022 17:36:15 +0000
|
||||
|
||||
Action: failed
|
||||
Final-Recipient: rfc822; receiver@test.com
|
||||
Diagnostic-Code: smtp; 550 5.4.1 Recipient address rejected: Access denied. AS(201806281) [VE1EUR03FT020.eop-EUR03.prod.protection.outlook.com]
|
||||
Last-Attempt-Date: Sat, 04 Jun 2022 17:36:15 +0000
|
||||
Status: 5.4.1
|
||||
|
||||
--dsn_001654364175_000510273818
|
||||
Content-Type: text/rfc822-headers
|
||||
|
||||
Authentication-Results: mx.messagelabs.com; spf=pass
|
||||
(server-22.tower-727.messagelabs.com: domain of gmail.com designates
|
||||
209.85.208.172 as permitted sender) smtp.mailfrom=gmail.com; dkim=pass
|
||||
(good signature) header.i=@gmail.com header.s=20210112; dmarc=pass
|
||||
(p=none sp=quarantine adkim=r aspf=r) header.from=gmail.com
|
||||
X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrBIsWRWlGSWpSXmKPExsVyMfTCGl3eGbO
|
||||
TDHZ9MbJoOPKfyYHRo3HKbqYAxijWzLyk/IoE1oym0/kFVxkrjk3vZm1gPMrYxcjFISQwjVFi
|
||||
+643zCAOi8AdFonzR6eAORICP1gkjt85BlTGCeRUSXxdcIUZwi6SmHrmBCNE0QpGid7u2ewgC
|
||||
V4BQYmTM5+wgNhsAloSa2c/Z+ti5AAaqyLxvjERoiRA4l5rL9hMYQFRiQ2rmsBaRQTkJe6+/Q
|
||||
rWyizgI/HwyUzWCYy8s5BMnYUkBWFrSrRu/80OYWtILLizj3EBI8sqRpukosz0jJLcxMwcXUM
|
||||
DA11DQ1NdSzNdQ0tjvcQq3US91FLdvPyikgxdQ73E8mK91OJiveLK3OScFL281JJNjMDATClO
|
||||
OLiDccW+X3qHGCU5mJREed9PnZUkxJeUn1KZkVicEV9UmpNafIhRhoNDSYJ3/bTZSUKCRanpq
|
||||
RVpmTnAKIFJS3DwKInwcrQCpXmLCxJzizPTIVKnGF051rfs38vM8e7LeSC58vAVILkbTN7+DS
|
||||
SFWPLy81KlxHltQWYLgDRnlObBjYZF+CVGWSlhXkYGBgYhnoLUotzMElT5V4ziHIxKwrxN04G
|
||||
m8GTmlcBd8AroOCag40pezwA5riQRISXVwLSg7PomwVaPPIPVRpr/vX9q/ZVhFS/I0m/3/Dnz
|
||||
EP++WSfTvWcdjkj4aXDlpObGz/u+vJn32v/B0RcBDz2/rjzDfKH4oIRGmXvdDc6/01mOXT8eo
|
||||
V6XYXmQx0nxluL5+JoLk6ef3X5R7nNT1pd1bNIBR9b4/Oqfdr3N6gunuVjpTpGpHl5rO+tjnB
|
||||
fpxeTf5pY+s0K79Zh9UOts9VsNFzijV53ur7wwc3un3lnTd/MnHNNc1WJ0+P3ZhU4bg1O2hHx
|
||||
9d22/lZnex5X8C6ouLViv+86xb+lGPW037c+icXPsqs47fVeS7lhx3kb3lcLB3ceL055+71yp
|
||||
Y64Q9fEB95Hl//w0CsMUFYTNRZ9EHJutxFKckWioxVxUnAgAfBfZtWsDAAA=
|
||||
X-Env-Sender: sender@test.com
|
||||
X-Msg-Ref: server-22.tower-727.messagelabs.com!1654364173!121509!1
|
||||
X-Originating-IP: [209.85.208.172]
|
||||
X-StarScan-Received:
|
||||
X-StarScan-Version: 9.86.7; banners=-,-,-
|
||||
Received: (qmail 9118 invoked from network); 4 Jun 2022 17:36:13 -0000
|
||||
Received: from mail-lj1-f172.google.com (HELO mail-lj1-f172.google.com) (209.85.208.172)
|
||||
by server-22.tower-727.messagelabs.com with ECDHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 4 Jun 2022 17:36:13 -0000
|
||||
Received: by mail-lj1-f172.google.com with SMTP id t13so11631540ljd.6
|
||||
for <receiver@test.com>; Sat, 04 Jun 2022 10:36:13 -0700 (PDT)
|
||||
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
|
||||
d=gmail.com; s=20210112;
|
||||
h=mime-version:from:date:message-id:subject:to;
|
||||
bh=xFh/FA5+5DNZ2/JLOLU7mMMt1uI12BZ7phvcaV8eILo=;
|
||||
b=d9qgKypHOWzUt75eGsZQFQJw9g76hEEW3wxHwUfo8duK9UBfXGLZidKbh+nlc9S/dJ
|
||||
2vkpdQMNGv/Relnc97pfG0Kot7haq81K6zv8vDy5axBLVpAcnTIxqapxxYU7Fv4LfBwt
|
||||
FCDd+KwMpo/cPUMNhyHTcZTC9Vgy9CYeaLSWPuklrZFY067MFY4+h1lCqAenii79fgds
|
||||
jdJO4gxtmxqiylkZ5Zg47vRGC/QBcujfM+yqlnmceFcl/zk7VjUwy0cWL8RJyY3/SsMu
|
||||
uCUfVcJW9g479x0xGlsDo5R+Hki//3/tuntiGrX0dZ/ZYoO82V0MXI6wyciCTPlnTBZe
|
||||
LALg==
|
||||
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
|
||||
d=1e100.net; s=20210112;
|
||||
h=x-gm-message-state:mime-version:from:date:message-id:subject:to;
|
||||
bh=xFh/FA5+5DNZ2/JLOLU7mMMt1uI12BZ7phvcaV8eILo=;
|
||||
b=TgsBJOHXrUhjG4M2YBQM8eq1DUenJXHfsvPa3kv0gmz4uXm4WW+nJBI6a/AwYAcQLU
|
||||
KDMu2frSMo6NWOuwliF9fFOhvmXoSsa0t/+Egf6JjdyWf4E/43FuXUDmTFAc64QOjNn4
|
||||
2JKKZTvtZIb2mr2KlV8aIo2a3zGoOTHkr9+wam6VLrYA8ZEq9/iWepb5bZCDhL87Ejok
|
||||
c/ZXS94CA61bs3fNC2+0BH0Ip+2NoT7gCmPa4BD1UcLFEeRNXMIPXvU7d9q9+7/a0av1
|
||||
PxaeXBZAmOzBi8jnk0MWqvgKXGb15iXMxIzJ26kLh1pr5qvnjDnn4lDekLQ3nBOhTnTW
|
||||
JFYw==
|
||||
X-Gm-Message-State: AOAM530iYJA0d0Tz8dZX0NsFF+7q99Wa030oXlAWhBcG+1aXSEUFzIz3
|
||||
1n67maV///D1r2j+jce8tVk4kduRkdorqTrv6FJdMGzi
|
||||
X-Google-Smtp-Source: ABdhPJxKO7OXGi0lFlyBHW1Dp/vUKk6Je8jHhcrK4jHsQiUCGDG0xW1l0zR987O4jGj6v7OuFooO9NrmgtZZAz9OnVs=
|
||||
X-Received: by 2002:a2e:8752:0:b0:255:6df7:7ad5 with SMTP id
|
||||
q18-20020a2e8752000000b002556df77ad5mr10128289ljj.73.1654364172861; Sat, 04
|
||||
Jun 2022 10:36:12 -0700 (PDT)
|
||||
MIME-Version: 1.0
|
||||
From: Sender <sender@test.com>
|
||||
Date: Sat, 4 Jun 2022 20:36:01 +0300
|
||||
Message-ID: <CAKouvC4fBcE7qfvhEq0-qOtsD45mWckUfhtr7KHhobwwvy0thA@mail.gmail.com>
|
||||
Subject: Test bounced
|
||||
To: receiver@test.com
|
||||
Content-Type: multipart/alternative; boundary="000000000000da472305e0a2ac8e"
|
||||
|
||||
--dsn_001654364175_000510273818--
|
||||
734
tests/unit/testData/Core/Mail/email_defs.php
Normal file
734
tests/unit/testData/Core/Mail/email_defs.php
Normal file
@@ -0,0 +1,734 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'attributes' => [
|
||||
'id' =>
|
||||
[
|
||||
'dbType' => 'varchar',
|
||||
'len' => 24,
|
||||
'type' => 'id',
|
||||
],
|
||||
'name' =>
|
||||
[
|
||||
'type' => 'varchar',
|
||||
'len' => 255,
|
||||
],
|
||||
'deleted' =>
|
||||
[
|
||||
'type' => 'bool',
|
||||
'default' => false,
|
||||
],
|
||||
'subject' =>
|
||||
[
|
||||
'type' => 'varchar',
|
||||
'notStorable' => true,
|
||||
'len' => 255,
|
||||
],
|
||||
'fromName' =>
|
||||
[
|
||||
'type' => 'varchar',
|
||||
'len' => 255,
|
||||
],
|
||||
'fromString' =>
|
||||
[
|
||||
'type' => 'varchar',
|
||||
'len' => 255,
|
||||
],
|
||||
'replyToString' =>
|
||||
[
|
||||
'type' => 'varchar',
|
||||
'len' => 255,
|
||||
],
|
||||
'from' =>
|
||||
[
|
||||
'type' => 'varchar',
|
||||
'notStorable' => true,
|
||||
'len' => 255,
|
||||
],
|
||||
'to' =>
|
||||
[
|
||||
'type' => 'varchar',
|
||||
'notStorable' => true,
|
||||
'len' => 255,
|
||||
],
|
||||
'cc' =>
|
||||
[
|
||||
'type' => 'varchar',
|
||||
'notStorable' => true,
|
||||
'len' => 255,
|
||||
],
|
||||
'bcc' =>
|
||||
[
|
||||
'type' => 'varchar',
|
||||
'notStorable' => true,
|
||||
'len' => 255,
|
||||
],
|
||||
'replyTo' =>
|
||||
[
|
||||
'type' => 'varchar',
|
||||
'notStorable' => true,
|
||||
'len' => 255,
|
||||
],
|
||||
'personStringData' =>
|
||||
[
|
||||
'type' => 'varchar',
|
||||
'notStorable' => true,
|
||||
'len' => 255,
|
||||
],
|
||||
'isRead' =>
|
||||
[
|
||||
'type' => 'bool',
|
||||
'notStorable' => true,
|
||||
'default' => true,
|
||||
],
|
||||
'isNotRead' =>
|
||||
[
|
||||
'type' => 'bool',
|
||||
'notStorable' => true,
|
||||
'default' => false,
|
||||
],
|
||||
'isReplied' =>
|
||||
[
|
||||
'type' => 'bool',
|
||||
'default' => false,
|
||||
],
|
||||
'isNotReplied' =>
|
||||
[
|
||||
'type' => 'bool',
|
||||
'notStorable' => true,
|
||||
'default' => false,
|
||||
],
|
||||
'isImportant' =>
|
||||
[
|
||||
'type' => 'bool',
|
||||
'notStorable' => true,
|
||||
'default' => false,
|
||||
],
|
||||
'inTrash' =>
|
||||
[
|
||||
'type' => 'bool',
|
||||
'notStorable' => true,
|
||||
'default' => false,
|
||||
],
|
||||
'folderId' =>
|
||||
[
|
||||
'dbType' => 'varchar',
|
||||
'len' => 255,
|
||||
'type' => 'foreignId',
|
||||
'notStorable' => true,
|
||||
'default' => '',
|
||||
'index' => 'folder',
|
||||
'notNull' => false,
|
||||
],
|
||||
'isUsers' =>
|
||||
[
|
||||
'type' => 'bool',
|
||||
'notStorable' => true,
|
||||
'default' => false,
|
||||
],
|
||||
'nameHash' =>
|
||||
[
|
||||
'type' => 'jsonObject',
|
||||
'notStorable' => true,
|
||||
],
|
||||
'typeHash' =>
|
||||
[
|
||||
'type' => 'jsonObject',
|
||||
'notStorable' => true,
|
||||
],
|
||||
'idHash' =>
|
||||
[
|
||||
'type' => 'jsonObject',
|
||||
'notStorable' => true,
|
||||
],
|
||||
'messageId' =>
|
||||
[
|
||||
'type' => 'varchar',
|
||||
'len' => 255,
|
||||
],
|
||||
'messageIdInternal' =>
|
||||
[
|
||||
'type' => 'varchar',
|
||||
'len' => 300,
|
||||
'index' => true,
|
||||
],
|
||||
'emailAddress' =>
|
||||
[
|
||||
'type' => 'base',
|
||||
'notStorable' => true,
|
||||
],
|
||||
'bodyPlain' =>
|
||||
[
|
||||
'type' => 'text',
|
||||
],
|
||||
'body' =>
|
||||
[
|
||||
'type' => 'text',
|
||||
],
|
||||
'isHtml' =>
|
||||
[
|
||||
'type' => 'bool',
|
||||
'default' => true,
|
||||
],
|
||||
'status' =>
|
||||
[
|
||||
'type' => 'varchar',
|
||||
'default' => 'Archived',
|
||||
'len' => 255,
|
||||
],
|
||||
'hasAttachment' =>
|
||||
[
|
||||
'type' => 'bool',
|
||||
'default' => false,
|
||||
],
|
||||
'dateSent' =>
|
||||
[
|
||||
'type' => 'datetime',
|
||||
'notNull' => false,
|
||||
],
|
||||
'deliveryDate' =>
|
||||
[
|
||||
'type' => 'datetime',
|
||||
'notNull' => false,
|
||||
],
|
||||
'createdAt' =>
|
||||
[
|
||||
'type' => 'datetime',
|
||||
'notNull' => false,
|
||||
],
|
||||
'modifiedAt' =>
|
||||
[
|
||||
'type' => 'datetime',
|
||||
'notNull' => false,
|
||||
],
|
||||
'isSystem' =>
|
||||
[
|
||||
'type' => 'bool',
|
||||
'default' => false,
|
||||
],
|
||||
'isJustSent' =>
|
||||
[
|
||||
'type' => 'bool',
|
||||
'notStorable' => true,
|
||||
'default' => false,
|
||||
],
|
||||
'isBeingImported' =>
|
||||
[
|
||||
'type' => 'bool',
|
||||
'notStorable' => true,
|
||||
'default' => false,
|
||||
],
|
||||
'folderName' =>
|
||||
[
|
||||
'type' => 'varchar',
|
||||
'notStorable' => true,
|
||||
],
|
||||
'fromEmailAddressId' =>
|
||||
[
|
||||
'dbType' => 'varchar',
|
||||
'len' => 24,
|
||||
'type' => 'foreignId',
|
||||
'index' => true,
|
||||
'notNull' => false,
|
||||
],
|
||||
'fromEmailAddressName' =>
|
||||
[
|
||||
'type' => 'foreign',
|
||||
'notStorable' => false,
|
||||
'relation' => 'fromEmailAddress',
|
||||
'foreign' => 'name',
|
||||
],
|
||||
'toEmailAddressesIds' =>
|
||||
[
|
||||
'type' => 'varchar',
|
||||
'notStorable' => true,
|
||||
],
|
||||
'toEmailAddressesNames' =>
|
||||
[
|
||||
'type' => 'varchar',
|
||||
'notStorable' => true,
|
||||
],
|
||||
'ccEmailAddressesIds' =>
|
||||
[
|
||||
'type' => 'varchar',
|
||||
'notStorable' => true,
|
||||
],
|
||||
'ccEmailAddressesNames' =>
|
||||
[
|
||||
'type' => 'varchar',
|
||||
'notStorable' => true,
|
||||
],
|
||||
'attachmentsIds' =>
|
||||
[
|
||||
'type' => 'varchar',
|
||||
'notStorable' => true,
|
||||
],
|
||||
'attachmentsNames' =>
|
||||
[
|
||||
'type' => 'varchar',
|
||||
'notStorable' => true,
|
||||
],
|
||||
'parentId' =>
|
||||
[
|
||||
'dbType' => 'varchar',
|
||||
'len' => 24,
|
||||
'type' => 'foreignId',
|
||||
'index' => 'parent',
|
||||
'notNull' => false,
|
||||
],
|
||||
'parentType' =>
|
||||
[
|
||||
'type' => 'foreignType',
|
||||
'notNull' => false,
|
||||
'index' => 'parent',
|
||||
'len' => 100,
|
||||
'dbType' => 'varchar',
|
||||
],
|
||||
'parentName' =>
|
||||
[
|
||||
'type' => 'varchar',
|
||||
'notStorable' => true,
|
||||
],
|
||||
'createdById' =>
|
||||
[
|
||||
'dbType' => 'varchar',
|
||||
'len' => 24,
|
||||
'type' => 'foreignId',
|
||||
'index' => true,
|
||||
'notNull' => false,
|
||||
],
|
||||
'createdByName' =>
|
||||
[
|
||||
'type' => 'foreign',
|
||||
'notStorable' => false,
|
||||
'relation' => 'createdBy',
|
||||
'foreign' =>
|
||||
[
|
||||
0 => 'firstName',
|
||||
1 => ' ',
|
||||
2 => 'lastName',
|
||||
],
|
||||
],
|
||||
'sentById' =>
|
||||
[
|
||||
'dbType' => 'varchar',
|
||||
'len' => 24,
|
||||
'type' => 'foreignId',
|
||||
'index' => true,
|
||||
'notNull' => false,
|
||||
],
|
||||
'sentByName' =>
|
||||
[
|
||||
'type' => 'foreign',
|
||||
'notStorable' => false,
|
||||
'relation' => 'sentBy',
|
||||
'foreign' =>
|
||||
[
|
||||
0 => 'firstName',
|
||||
1 => ' ',
|
||||
2 => 'lastName',
|
||||
],
|
||||
],
|
||||
'modifiedById' =>
|
||||
[
|
||||
'dbType' => 'varchar',
|
||||
'len' => 24,
|
||||
'type' => 'foreignId',
|
||||
'index' => true,
|
||||
'notNull' => false,
|
||||
],
|
||||
'modifiedByName' =>
|
||||
[
|
||||
'type' => 'foreign',
|
||||
'notStorable' => false,
|
||||
'relation' => 'modifiedBy',
|
||||
'foreign' =>
|
||||
[
|
||||
0 => 'firstName',
|
||||
1 => ' ',
|
||||
2 => 'lastName',
|
||||
],
|
||||
],
|
||||
'assignedUserId' =>
|
||||
[
|
||||
'dbType' => 'varchar',
|
||||
'len' => 24,
|
||||
'type' => 'foreignId',
|
||||
'index' => true,
|
||||
'notNull' => false,
|
||||
],
|
||||
'assignedUserName' =>
|
||||
[
|
||||
'type' => 'foreign',
|
||||
'notStorable' => false,
|
||||
'relation' => 'assignedUser',
|
||||
'foreign' =>
|
||||
[
|
||||
0 => 'firstName',
|
||||
1 => ' ',
|
||||
2 => 'lastName',
|
||||
],
|
||||
],
|
||||
'repliedId' =>
|
||||
[
|
||||
'dbType' => 'varchar',
|
||||
'len' => 24,
|
||||
'type' => 'foreignId',
|
||||
'index' => true,
|
||||
'notNull' => false,
|
||||
],
|
||||
'repliedName' =>
|
||||
[
|
||||
'type' => 'foreign',
|
||||
'notStorable' => false,
|
||||
'relation' => 'replied',
|
||||
'foreign' => 'name',
|
||||
],
|
||||
'repliesIds' =>
|
||||
[
|
||||
'type' => 'varchar',
|
||||
'notStorable' => true,
|
||||
],
|
||||
'repliesNames' =>
|
||||
[
|
||||
'type' => 'varchar',
|
||||
'notStorable' => true,
|
||||
],
|
||||
'teamsIds' =>
|
||||
[
|
||||
'type' => 'varchar',
|
||||
'notStorable' => true,
|
||||
],
|
||||
'teamsNames' =>
|
||||
[
|
||||
'type' => 'varchar',
|
||||
'notStorable' => true,
|
||||
],
|
||||
'usersIds' =>
|
||||
[
|
||||
'type' => 'jsonArray',
|
||||
'notStorable' => true,
|
||||
],
|
||||
'usersNames' =>
|
||||
[
|
||||
'type' => 'jsonObject',
|
||||
'notStorable' => true,
|
||||
],
|
||||
'usersColumns' =>
|
||||
[
|
||||
'type' => 'jsonObject',
|
||||
'notStorable' => true,
|
||||
],
|
||||
'assignedUsersIds' =>
|
||||
[
|
||||
'type' => 'jsonArray',
|
||||
'notStorable' => true,
|
||||
],
|
||||
'assignedUsersNames' =>
|
||||
[
|
||||
'type' => 'jsonObject',
|
||||
'notStorable' => true,
|
||||
],
|
||||
'inboundEmailsIds' =>
|
||||
[
|
||||
'type' => 'jsonArray',
|
||||
'notStorable' => true,
|
||||
],
|
||||
'inboundEmailsNames' =>
|
||||
[
|
||||
'type' => 'jsonObject',
|
||||
'notStorable' => true,
|
||||
],
|
||||
'emailAccountsIds' =>
|
||||
[
|
||||
'type' => 'jsonArray',
|
||||
'notStorable' => true,
|
||||
],
|
||||
'emailAccountsNames' =>
|
||||
[
|
||||
'type' => 'jsonObject',
|
||||
'notStorable' => true,
|
||||
],
|
||||
'accountId' =>
|
||||
[
|
||||
'dbType' => 'varchar',
|
||||
'len' => 24,
|
||||
'type' => 'foreignId',
|
||||
'index' => true,
|
||||
'notNull' => false,
|
||||
],
|
||||
'accountName' =>
|
||||
[
|
||||
'type' => 'foreign',
|
||||
'notStorable' => false,
|
||||
'relation' => 'account',
|
||||
'foreign' => 'name',
|
||||
],
|
||||
'bccEmailAddressesIds' =>
|
||||
[
|
||||
'type' => 'varchar',
|
||||
'notStorable' => true,
|
||||
],
|
||||
'bccEmailAddressesNames' =>
|
||||
[
|
||||
'type' => 'varchar',
|
||||
'notStorable' => true,
|
||||
],
|
||||
'attachmentsTypes' =>
|
||||
[
|
||||
'type' => 'jsonObject',
|
||||
'notStorable' => true,
|
||||
],
|
||||
],
|
||||
'relations' => [
|
||||
'account' =>
|
||||
[
|
||||
'type' => 'belongsTo',
|
||||
'entity' => 'Account',
|
||||
'key' => 'accountId',
|
||||
'foreignKey' => 'id',
|
||||
],
|
||||
'emailAccounts' =>
|
||||
[
|
||||
'type' => 'manyMany',
|
||||
'entity' => 'EmailAccount',
|
||||
'relationName' => 'emailEmailAccount',
|
||||
'key' => 'id',
|
||||
'foreignKey' => 'id',
|
||||
'midKeys' =>
|
||||
[
|
||||
0 => 'emailId',
|
||||
1 => 'emailAccountId',
|
||||
],
|
||||
],
|
||||
'inboundEmails' =>
|
||||
[
|
||||
'type' => 'manyMany',
|
||||
'entity' => 'InboundEmail',
|
||||
'relationName' => 'emailInboundEmail',
|
||||
'key' => 'id',
|
||||
'foreignKey' => 'id',
|
||||
'midKeys' =>
|
||||
[
|
||||
0 => 'emailId',
|
||||
1 => 'inboundEmailId',
|
||||
],
|
||||
],
|
||||
'bccEmailAddresses' =>
|
||||
[
|
||||
'type' => 'manyMany',
|
||||
'entity' => 'EmailAddress',
|
||||
'foreignKey' => 'id',
|
||||
'midKeys' =>
|
||||
[
|
||||
0 => 'emailId',
|
||||
1 => 'emailAddressId',
|
||||
],
|
||||
'relationName' => 'emailEmailAddress',
|
||||
'conditions' =>
|
||||
[
|
||||
'addressType' => 'bcc',
|
||||
],
|
||||
'additionalColumns' =>
|
||||
[
|
||||
'addressType' =>
|
||||
[
|
||||
'type' => 'varchar',
|
||||
'len' => '4',
|
||||
],
|
||||
],
|
||||
],
|
||||
'ccEmailAddresses' =>
|
||||
[
|
||||
'type' => 'manyMany',
|
||||
'entity' => 'EmailAddress',
|
||||
'foreignKey' => 'id',
|
||||
'midKeys' =>
|
||||
[
|
||||
0 => 'emailId',
|
||||
1 => 'emailAddressId',
|
||||
],
|
||||
'relationName' => 'emailEmailAddress',
|
||||
'conditions' =>
|
||||
[
|
||||
'addressType' => 'cc',
|
||||
],
|
||||
'additionalColumns' =>
|
||||
[
|
||||
'addressType' =>
|
||||
[
|
||||
'type' => 'varchar',
|
||||
'len' => '4',
|
||||
],
|
||||
],
|
||||
],
|
||||
'toEmailAddresses' =>
|
||||
[
|
||||
'type' => 'manyMany',
|
||||
'entity' => 'EmailAddress',
|
||||
'foreignKey' => 'id',
|
||||
'midKeys' =>
|
||||
[
|
||||
0 => 'emailId',
|
||||
1 => 'emailAddressId',
|
||||
],
|
||||
'relationName' => 'emailEmailAddress',
|
||||
'conditions' =>
|
||||
[
|
||||
'addressType' => 'to',
|
||||
],
|
||||
'additionalColumns' =>
|
||||
[
|
||||
'addressType' =>
|
||||
[
|
||||
'type' => 'varchar',
|
||||
'len' => '4',
|
||||
],
|
||||
],
|
||||
],
|
||||
'fromEmailAddress' =>
|
||||
[
|
||||
'type' => 'belongsTo',
|
||||
'entity' => 'EmailAddress',
|
||||
'key' => 'fromEmailAddressId',
|
||||
'foreignKey' => 'id',
|
||||
],
|
||||
'replies' =>
|
||||
[
|
||||
'type' => 'hasMany',
|
||||
'entity' => 'Email',
|
||||
'foreignKey' => 'repliedId',
|
||||
],
|
||||
'replied' =>
|
||||
[
|
||||
'type' => 'belongsTo',
|
||||
'entity' => 'Email',
|
||||
'key' => 'repliedId',
|
||||
'foreignKey' => 'id',
|
||||
],
|
||||
'parent' =>
|
||||
[
|
||||
'type' => 'belongsToParent',
|
||||
'key' => 'parentId',
|
||||
],
|
||||
'sentBy' =>
|
||||
[
|
||||
'type' => 'belongsTo',
|
||||
'entity' => 'User',
|
||||
'key' => 'sentById',
|
||||
'foreignKey' => 'id',
|
||||
],
|
||||
'users' =>
|
||||
[
|
||||
'type' => 'manyMany',
|
||||
'entity' => 'User',
|
||||
'relationName' => 'emailUser',
|
||||
'key' => 'id',
|
||||
'foreignKey' => 'id',
|
||||
'midKeys' =>
|
||||
[
|
||||
0 => 'emailId',
|
||||
1 => 'userId',
|
||||
],
|
||||
'additionalColumns' =>
|
||||
[
|
||||
'isRead' =>
|
||||
[
|
||||
'type' => 'bool',
|
||||
'default' => false,
|
||||
],
|
||||
'isImportant' =>
|
||||
[
|
||||
'type' => 'bool',
|
||||
'default' => false,
|
||||
],
|
||||
'inTrash' =>
|
||||
[
|
||||
'type' => 'bool',
|
||||
'default' => false,
|
||||
],
|
||||
'folderId' =>
|
||||
[
|
||||
'type' => 'varchar',
|
||||
'default' => NULL,
|
||||
'maxLength' => 24,
|
||||
],
|
||||
],
|
||||
],
|
||||
'assignedUsers' =>
|
||||
[
|
||||
'type' => 'manyMany',
|
||||
'entity' => 'User',
|
||||
'relationName' => 'entityUser',
|
||||
'midKeys' =>
|
||||
[
|
||||
0 => 'entityId',
|
||||
1 => 'userId',
|
||||
],
|
||||
'conditions' =>
|
||||
[
|
||||
'entityType' => 'Email',
|
||||
],
|
||||
'additionalColumns' =>
|
||||
[
|
||||
'entityType' =>
|
||||
[
|
||||
'type' => 'varchar',
|
||||
'len' => 100,
|
||||
],
|
||||
],
|
||||
],
|
||||
'teams' =>
|
||||
[
|
||||
'type' => 'manyMany',
|
||||
'entity' => 'Team',
|
||||
'relationName' => 'entityTeam',
|
||||
'midKeys' =>
|
||||
[
|
||||
0 => 'entity_id',
|
||||
1 => 'team_id',
|
||||
],
|
||||
'conditions' =>
|
||||
[
|
||||
'entityType' => 'Email',
|
||||
],
|
||||
'additionalColumns' =>
|
||||
[
|
||||
'entityType' =>
|
||||
[
|
||||
'type' => 'varchar',
|
||||
'len' => 100,
|
||||
],
|
||||
],
|
||||
],
|
||||
'assignedUser' =>
|
||||
[
|
||||
'type' => 'belongsTo',
|
||||
'entity' => 'User',
|
||||
'key' => 'assignedUserId',
|
||||
'foreignKey' => 'id',
|
||||
],
|
||||
'modifiedBy' =>
|
||||
[
|
||||
'type' => 'belongsTo',
|
||||
'entity' => 'User',
|
||||
'key' => 'modifiedById',
|
||||
'foreignKey' => 'id',
|
||||
],
|
||||
'createdBy' =>
|
||||
[
|
||||
'type' => 'belongsTo',
|
||||
'entity' => 'User',
|
||||
'key' => 'createdById',
|
||||
'foreignKey' => 'id',
|
||||
],
|
||||
'attachments' =>
|
||||
[
|
||||
'type' => 'hasChildren',
|
||||
'entity' => 'Attachment',
|
||||
'foreignKey' => 'parentId',
|
||||
'foreignType' => 'parentType',
|
||||
'relationName' => 'attachments',
|
||||
],
|
||||
]
|
||||
];
|
||||
72
tests/unit/testData/Core/Mail/test_email_1.eml
Normal file
72
tests/unit/testData/Core/Mail/test_email_1.eml
Normal file
@@ -0,0 +1,72 @@
|
||||
Delivered-To: r@test.com
|
||||
Received: by 10.31.148.78 with SMTP id w75csp286584vkd;
|
||||
Mon, 20 Jun 2016 01:20:29 -0700 (PDT)
|
||||
X-Received: by 10.157.6.229 with SMTP id 92mr7655314otx.100.1466410829313;
|
||||
Mon, 20 Jun 2016 01:20:29 -0700 (PDT)
|
||||
Return-Path: <test@test.com>
|
||||
Received: from gateway23.websitewelcome.com (gateway23.websitewelcome.com. [192.185.49.180])
|
||||
by mx.google.com with ESMTPS id p37si26381402otc.180.2016.06.20.01.20.28
|
||||
for <r@test.com>
|
||||
(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
|
||||
Mon, 20 Jun 2016 01:20:28 -0700 (PDT)
|
||||
Received-SPF: pass (google.com: domain of test@test.com designates 192.185.49.180 as permitted sender) client-ip=192.1.1.1;
|
||||
Authentication-Results: mx.google.com;
|
||||
dkim=pass header.i=@test.com;
|
||||
spf=pass (google.com: domain of test@test.com designates 192.185.49.180 as permitted sender) smtp.mailfrom=test@test.com
|
||||
Received: from cm6.websitewelcome.com (cm6.websitewelcome.com [108.167.139.19])
|
||||
by gateway23.websitewelcome.com (Postfix) with ESMTP id 8BD57E3F3FDD9
|
||||
for <r@test.com>; Mon, 20 Jun 2016 03:19:09 -0500 (CDT)
|
||||
Received: from gator3176.hostgator.com ([198.57.247.140])
|
||||
by cm6.websitewelcome.com with
|
||||
id 8wK81t00132V7ti01wK9U2; Mon, 20 Jun 2016 03:19:09 -0500
|
||||
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=letrium.com
|
||||
; s=default; h=Sender:Message-ID:Content-Type:MIME-Version:Subject:To:From:
|
||||
Date; bh=Pme4GoBt5eTvqFCiM+2YRNRYf0BQnD+oHyM3/b6A+9g=; b=MH7sP3R86fY7oXsA5wpd
|
||||
gRPRCx/1bavNIC0s03TFso+UKhDfVBWfWhBxXyTeOVSO2L2bRL8Zt0nHDeJ9m0kP+6H8t4oJ4WzaK
|
||||
Pds0MnWi8W/43pmjLK2So71cV29h6uoiMAUIezdD8tf4L5wr4kmIWOkvpMZn/WUKZbV76HYk4TgLH
|
||||
rvqrxhw6twC6YeLuMmRene7J3sK7BaqA7EzXRTOFq1MA6w4BQiROU8xTbs4zIKmP1aJtmS0fmQ2h/
|
||||
ti3eY/sfVFrPH+dBg0E3i3fOzFVByfdOWiCDNn6wbmOADGhJtP8ha9t211nBft4eLhy1U9gQopZoi
|
||||
w1GVB/BPWG18lQ==;
|
||||
Received: from [176.120.34.87] (port=53654 helo=admin)
|
||||
by gator3176.hostgator.com with esmtpa (Exim 4.86_1)
|
||||
(envelope-from <test@test.com>)
|
||||
id 1bEuQF-0005nx-E0
|
||||
for r@test.com; Mon, 20 Jun 2016 03:19:07 -0500
|
||||
Date: Mon, 20 Jun 2016 08:19:00 +0000
|
||||
From: =?UTF-8?Q?Admin?= <test@test.com>
|
||||
To: r@test.com
|
||||
Subject: =?UTF-8?Q?test=203?=
|
||||
MIME-Version: 1.0
|
||||
Content-Type: multipart/alternative;
|
||||
boundary="=_0717b57629da34f0caefc9ef946dc630"
|
||||
Message-ID: <e558c4dfc2a0f0d60f5ebff474c97ffc/1466410740/1950@espo>
|
||||
Sender: <test@test.com>
|
||||
X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
|
||||
X-AntiAbuse: Primary Hostname - gator3176.hostgator.com
|
||||
X-AntiAbuse: Original Domain - gmail.com
|
||||
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
|
||||
X-AntiAbuse: Sender Address Domain - letrium.com
|
||||
X-BWhitelist: no
|
||||
X-Source-IP: 176.120.34.87
|
||||
X-Exim-ID: 1bEuQF-0005nx-E0
|
||||
X-Source:
|
||||
X-Source-Args:
|
||||
X-Source-Dir:
|
||||
X-Source-Sender: (admin) [192.1.1.1;]:53654
|
||||
X-Source-Auth: test+test.com
|
||||
X-Email-Count: 4
|
||||
X-Source-Cap: b2xla3NpeTtvbGVrc2l5O2dhdG9yMzE3Ni5ob3N0Z2F0b3IuY29t
|
||||
|
||||
This is a message in Mime Format. If you see this, your mail reader does not support this format.
|
||||
|
||||
--=_0717b57629da34f0caefc9ef946dc630
|
||||
Content-Type: text/plain; charset=utf-8
|
||||
Content-Transfer-Encoding: quoted-printable
|
||||
|
||||
=0A=0A=0A=0AAdmin Test
|
||||
--=_0717b57629da34f0caefc9ef946dc630
|
||||
Content-Type: text/html; charset=utf-8
|
||||
Content-Transfer-Encoding: quoted-printable
|
||||
|
||||
<p><br></p><br>Admin Test
|
||||
--=_0717b57629da34f0caefc9ef946dc630--
|
||||
102
tests/unit/testData/DB/Entities.php
Normal file
102
tests/unit/testData/DB/Entities.php
Normal file
@@ -0,0 +1,102 @@
|
||||
<?php
|
||||
|
||||
namespace tests\unit\testData\DB;
|
||||
|
||||
use Espo\ORM\BaseEntity;
|
||||
|
||||
class TestEntity extends BaseEntity
|
||||
{
|
||||
public ?string $id = null;
|
||||
}
|
||||
|
||||
class Account extends TestEntity
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
class Team extends TestEntity
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
class EntityTeam extends TestEntity
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
class Contact extends TestEntity
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
class Post extends TestEntity
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
class Comment extends TestEntity
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
class PostData extends TestEntity
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
class Tag extends TestEntity
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
class PostTag extends TestEntity
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
class Note extends TestEntity
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
class Article extends TestEntity
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
class Category extends TestEntity
|
||||
{
|
||||
}
|
||||
|
||||
class Job extends TestEntity
|
||||
{
|
||||
public function getFromContainerOriginal(string $attribute)
|
||||
{
|
||||
return $this->getFromContainer($attribute);
|
||||
}
|
||||
}
|
||||
|
||||
class Test extends TestEntity
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
class Dependee extends TestEntity
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
class TestWhere extends TestEntity
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
class TestSelect extends TestEntity
|
||||
{
|
||||
}
|
||||
|
||||
class TestSelectRight extends TestEntity
|
||||
{
|
||||
}
|
||||
13
tests/unit/testData/DB/MockDBResult.php
Normal file
13
tests/unit/testData/DB/MockDBResult.php
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
class MockDBResult extends ArrayIterator
|
||||
{
|
||||
public function fetchAll()
|
||||
{
|
||||
$arr = array();
|
||||
foreach ($this as $value) {
|
||||
$arr[] = $value;
|
||||
}
|
||||
return $arr;
|
||||
}
|
||||
}
|
||||
8
tests/unit/testData/DB/MockPDO.php
Normal file
8
tests/unit/testData/DB/MockPDO.php
Normal file
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
class MockPDO extends PDO
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
}
|
||||
}
|
||||
615
tests/unit/testData/DB/ormMetadata.php
Normal file
615
tests/unit/testData/DB/ormMetadata.php
Normal file
@@ -0,0 +1,615 @@
|
||||
<?php
|
||||
|
||||
use Espo\ORM\Entity;
|
||||
use Espo\ORM\Query\Part\Join\JoinType;
|
||||
|
||||
return [
|
||||
'Account' => [
|
||||
'attributes' => [
|
||||
'id' => [
|
||||
'type' => Entity::ID,
|
||||
],
|
||||
'name' => [
|
||||
'type' => Entity::VARCHAR,
|
||||
'len' => 255,
|
||||
],
|
||||
'deleted' => [
|
||||
'type' => Entity::BOOL,
|
||||
'default' => 0,
|
||||
],
|
||||
'stub' => [
|
||||
'type' => 'varchar',
|
||||
'notStorable' => true,
|
||||
],
|
||||
],
|
||||
'relations' => [
|
||||
'teams' => [
|
||||
'type' => Entity::MANY_MANY,
|
||||
'entity' => 'Team',
|
||||
'relationName' => 'EntityTeam',
|
||||
'midKeys' => [
|
||||
'entityId',
|
||||
'teamId',
|
||||
],
|
||||
'conditions' => ['entityType' => 'Account'],
|
||||
],
|
||||
],
|
||||
'indexes' => [
|
||||
'name' => [
|
||||
'key' => 'IDX_NAME',
|
||||
],
|
||||
],
|
||||
],
|
||||
|
||||
'Team' => [
|
||||
'attributes' => [
|
||||
'id' => [
|
||||
'type' => Entity::ID,
|
||||
],
|
||||
'name' => [
|
||||
'type' => Entity::VARCHAR,
|
||||
'len' => 255,
|
||||
],
|
||||
'deleted' => [
|
||||
'type' => Entity::BOOL,
|
||||
'default' => 0,
|
||||
],
|
||||
],
|
||||
'relations' => [
|
||||
|
||||
],
|
||||
],
|
||||
|
||||
'EntityTeam' => [
|
||||
'attributes' => [
|
||||
'id' => [
|
||||
'type' => Entity::ID,
|
||||
'autoincrement' => true,
|
||||
'dbType' => 'int',
|
||||
],
|
||||
'entityId' => [
|
||||
'type' => Entity::FOREIGN_ID,
|
||||
'len' => 50,
|
||||
],
|
||||
'entityType' => [
|
||||
'type' => Entity::VARCHAR,
|
||||
'len' => 50,
|
||||
],
|
||||
'teamId' => [
|
||||
'type' => Entity::FOREIGN_ID,
|
||||
'len' => 50,
|
||||
],
|
||||
'deleted' => [
|
||||
'type' => Entity::BOOL,
|
||||
'default' => 0,
|
||||
],
|
||||
],
|
||||
'relations' => [
|
||||
|
||||
],
|
||||
],
|
||||
|
||||
'Contact' => [
|
||||
'attributes' => [
|
||||
'id' => [
|
||||
'type' => Entity::ID,
|
||||
],
|
||||
'name' => [
|
||||
'type' => Entity::VARCHAR,
|
||||
'notStorable' => true,
|
||||
'select' => "TRIM(CONCAT(contact.first_name, ' ', contact.last_name))",
|
||||
'where' => [
|
||||
'LIKE' => "(contact.first_name LIKE {value} OR contact.last_name LIKE {value} OR "
|
||||
."CONCAT(contact.first_name, ' ', contact.last_name) LIKE {value})",
|
||||
],
|
||||
'order' => "contact.first_name {direction}, contact.last_name {direction}",
|
||||
],
|
||||
'firstName' => [
|
||||
'type' => Entity::VARCHAR,
|
||||
],
|
||||
'lastName' => [
|
||||
'type' => Entity::VARCHAR,
|
||||
],
|
||||
'deleted' => [
|
||||
'type' => Entity::BOOL,
|
||||
'default' => 0,
|
||||
],
|
||||
],
|
||||
'relations' => [
|
||||
|
||||
],
|
||||
],
|
||||
|
||||
'Post' => [
|
||||
'attributes' => [
|
||||
'id' => [
|
||||
'type' => Entity::ID,
|
||||
],
|
||||
'name' => [
|
||||
'type' => Entity::VARCHAR,
|
||||
'len' => 255,
|
||||
],
|
||||
'privateField' => [
|
||||
'notStorable' => true,
|
||||
],
|
||||
'tagRole' => [
|
||||
'notStorable' => true,
|
||||
'type' => Entity::VARCHAR,
|
||||
],
|
||||
'createdByName' => [
|
||||
'type' => Entity::FOREIGN,
|
||||
'relation' => 'createdBy',
|
||||
'foreign' => ['salutationName', 'firstName', ' ', 'lastName'],
|
||||
],
|
||||
'createdById' => [
|
||||
'type' => Entity::FOREIGN_ID,
|
||||
],
|
||||
'deleted' => [
|
||||
'type' => Entity::BOOL,
|
||||
'default' => 0,
|
||||
],
|
||||
],
|
||||
'relations' => [
|
||||
'tags' => [
|
||||
'type' => Entity::MANY_MANY,
|
||||
'entity' => 'Tag',
|
||||
'relationName' => 'PostTag',
|
||||
'foreign' => 'posts',
|
||||
'key' => 'id',
|
||||
'foreignKey' => 'id',
|
||||
'midKeys' => [
|
||||
'postId',
|
||||
'tagId',
|
||||
],
|
||||
'additionalColumns' => [
|
||||
'role' => [
|
||||
'type' => Entity::VARCHAR,
|
||||
],
|
||||
],
|
||||
'columnAttributeMap' => [
|
||||
'role' => 'tagRole',
|
||||
],
|
||||
],
|
||||
'comments' => [
|
||||
'type' => Entity::HAS_MANY,
|
||||
'entity' => 'Comment',
|
||||
'foreignKey' => 'postId',
|
||||
],
|
||||
'createdBy' => [
|
||||
'type' => Entity::BELONGS_TO,
|
||||
'entity' => 'User',
|
||||
'key' => 'createdById',
|
||||
],
|
||||
'notes' => [
|
||||
'type' => Entity::HAS_CHILDREN,
|
||||
'entity' => 'Note',
|
||||
'foreignKey' => 'parentId',
|
||||
'foreignType' => 'parentType',
|
||||
],
|
||||
'postData' => [
|
||||
'type' => Entity::HAS_ONE,
|
||||
'entity' => 'PostData',
|
||||
'foreign' => 'post',
|
||||
'noJoin' => true,
|
||||
],
|
||||
],
|
||||
],
|
||||
|
||||
'Comment' => [
|
||||
'attributes' => [
|
||||
'id' => [
|
||||
'type' => Entity::ID,
|
||||
],
|
||||
'postId' => [
|
||||
'type' => Entity::FOREIGN_ID,
|
||||
],
|
||||
'postName' => [
|
||||
'type' => Entity::FOREIGN,
|
||||
'relation' => 'post',
|
||||
'foreign' => 'name',
|
||||
],
|
||||
'name' => [
|
||||
'type' => Entity::VARCHAR,
|
||||
'len' => 255,
|
||||
],
|
||||
'deleted' => [
|
||||
'type' => Entity::BOOL,
|
||||
'default' => 0,
|
||||
],
|
||||
],
|
||||
'relations' => [
|
||||
'post' => [
|
||||
'type' => Entity::BELONGS_TO,
|
||||
'entity' => 'Post',
|
||||
'key' => 'postId',
|
||||
'foreignKey' => 'id',
|
||||
],
|
||||
],
|
||||
],
|
||||
|
||||
'PostData' => [
|
||||
'attributes' => [
|
||||
'id' => [
|
||||
'type' => Entity::ID,
|
||||
],
|
||||
'postId' => [
|
||||
'type' => Entity::FOREIGN_ID,
|
||||
],
|
||||
'deleted' => [
|
||||
'type' => Entity::BOOL,
|
||||
'default' => 0,
|
||||
],
|
||||
],
|
||||
'relations' => [
|
||||
'post' => [
|
||||
'type' => Entity::BELONGS_TO,
|
||||
'entity' => 'Post',
|
||||
'key' => 'postId',
|
||||
'foreignKey' => 'id',
|
||||
'foreign' => 'postData',
|
||||
],
|
||||
],
|
||||
],
|
||||
|
||||
'Tag' => [
|
||||
'attributes' => [
|
||||
'id' => [
|
||||
'type' => Entity::ID,
|
||||
],
|
||||
'name' => [
|
||||
'type' => Entity::VARCHAR,
|
||||
'len' => 50,
|
||||
],
|
||||
'deleted' => [
|
||||
'type' => Entity::BOOL,
|
||||
'default' => 0,
|
||||
],
|
||||
'postRole' => [
|
||||
'type' => Entity::VARCHAR,
|
||||
'notStorable' => true,
|
||||
],
|
||||
],
|
||||
'relations' => [
|
||||
'posts' => [
|
||||
'type' => Entity::MANY_MANY,
|
||||
'entity' => 'Post',
|
||||
'foreign' => 'tags',
|
||||
'columnAttributeMap' => [
|
||||
'role' => 'postRole',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
|
||||
'PostTag' => [
|
||||
'attributes' => [
|
||||
'id' => [
|
||||
'type' => Entity::ID,
|
||||
'autoincrement' => true,
|
||||
'dbType' => 'int',
|
||||
],
|
||||
'postId' => [
|
||||
'type' => Entity::FOREIGN_ID,
|
||||
'len' => 50,
|
||||
],
|
||||
'tagId' => [
|
||||
'type' => Entity::FOREIGN_ID,
|
||||
'len' => 50,
|
||||
],
|
||||
'role' => [
|
||||
'type' => Entity::VARCHAR,
|
||||
],
|
||||
'deleted' => [
|
||||
'type' => Entity::BOOL,
|
||||
'default' => 0,
|
||||
],
|
||||
],
|
||||
'relations' => [
|
||||
|
||||
],
|
||||
'indexes' => [
|
||||
'postIdTagId' => [
|
||||
'key' => 'UNIQ_POST_ID_TAG_ID',
|
||||
'type' => 'unique',
|
||||
'columns' => ['postId', 'tagId'],
|
||||
],
|
||||
],
|
||||
],
|
||||
|
||||
'Note' => [
|
||||
'attributes' => [
|
||||
'id' => [
|
||||
'type' => Entity::ID,
|
||||
],
|
||||
'name' => [
|
||||
'type' => Entity::VARCHAR,
|
||||
'len' => 50,
|
||||
],
|
||||
'parentId' => [
|
||||
'type' => Entity::FOREIGN_ID,
|
||||
],
|
||||
'parentType' => [
|
||||
'type' => Entity::FOREIGN_TYPE,
|
||||
],
|
||||
'parentName' => [
|
||||
'type' => Entity::VARCHAR,
|
||||
'notStorable' => true,
|
||||
],
|
||||
'deleted' => [
|
||||
'type' => Entity::BOOL,
|
||||
'default' => 0,
|
||||
],
|
||||
],
|
||||
'relations' => [
|
||||
'parent' => [
|
||||
'type' => Entity::BELONGS_TO_PARENT,
|
||||
'entities' => ['Post'],
|
||||
'foreign' => 'notes',
|
||||
],
|
||||
],
|
||||
],
|
||||
|
||||
'Article' => [
|
||||
'attributes' => [
|
||||
'id' => [
|
||||
'type' => Entity::ID
|
||||
],
|
||||
'name' => [
|
||||
'type' => Entity::VARCHAR,
|
||||
'len' => 50,
|
||||
],
|
||||
'description' => [
|
||||
'type' => Entity::TEXT
|
||||
],
|
||||
'deleted' => [
|
||||
'type' => Entity::BOOL,
|
||||
'default' => 0
|
||||
],
|
||||
],
|
||||
'relations' => [
|
||||
|
||||
],
|
||||
],
|
||||
|
||||
'Job' => [
|
||||
'attributes' => [
|
||||
'id' => [
|
||||
'type' => Entity::ID
|
||||
],
|
||||
'string' => [
|
||||
'type' => Entity::VARCHAR,
|
||||
'len' => 50
|
||||
],
|
||||
'array' => [
|
||||
'type' => Entity::JSON_ARRAY
|
||||
],
|
||||
'arrayUnordered' => [
|
||||
'type' => Entity::JSON_ARRAY,
|
||||
'isUnordered' => true
|
||||
],
|
||||
'object' => [
|
||||
'type' => Entity::JSON_OBJECT
|
||||
],
|
||||
'deleted' => [
|
||||
'type' => Entity::BOOL,
|
||||
'default' => 0
|
||||
],
|
||||
],
|
||||
'relations' => [
|
||||
|
||||
],
|
||||
],
|
||||
|
||||
'Test' => [
|
||||
'attributes' => [
|
||||
'id' => [
|
||||
'type' => Entity::ID,
|
||||
],
|
||||
'name' => [
|
||||
'type' => Entity::VARCHAR,
|
||||
'len' => 255,
|
||||
],
|
||||
'date' => [
|
||||
'type' => Entity::DATE
|
||||
],
|
||||
'dateTime' => [
|
||||
'type' => Entity::DATETIME
|
||||
],
|
||||
'int' => [
|
||||
'type' => Entity::INT
|
||||
],
|
||||
'float' => [
|
||||
'type' => Entity::FLOAT
|
||||
],
|
||||
'list' => [
|
||||
'type' => Entity::JSON_ARRAY
|
||||
],
|
||||
'object' => [
|
||||
'type' => Entity::JSON_OBJECT
|
||||
],
|
||||
'deleted' => [
|
||||
'type' => Entity::BOOL,
|
||||
'default' => 0,
|
||||
]
|
||||
],
|
||||
'relations' => [
|
||||
|
||||
],
|
||||
],
|
||||
|
||||
'Dependee' => [
|
||||
'attributes' => [
|
||||
'id' => [
|
||||
'type' => Entity::ID,
|
||||
],
|
||||
'name' => [
|
||||
'type' => Entity::VARCHAR,
|
||||
'len' => 255,
|
||||
'dependeeAttributeList' => [
|
||||
'test'
|
||||
],
|
||||
],
|
||||
'test' => [
|
||||
'type' => Entity::BOOL,
|
||||
'default' => 0,
|
||||
],
|
||||
],
|
||||
'relations' => [
|
||||
|
||||
],
|
||||
],
|
||||
|
||||
'TestWhere' => [
|
||||
'attributes' => [
|
||||
'id' => [
|
||||
'type' => Entity::ID,
|
||||
],
|
||||
'test' => [
|
||||
'type' => Entity::VARCHAR,
|
||||
],
|
||||
'test1' => [
|
||||
'type' => Entity::VARCHAR,
|
||||
'notStorable' => true,
|
||||
'where' => [
|
||||
'=' => [
|
||||
'whereClause' => [
|
||||
'OR' => [
|
||||
['test' => '{value}'],
|
||||
['test' => '1'],
|
||||
['EQUAL:(test, LOWER:({value})):' => null],
|
||||
],
|
||||
],
|
||||
'joins' => [
|
||||
['Test', 't', ['t.id:' => 'id'], ["type" => JoinType::left->value]],
|
||||
],
|
||||
],
|
||||
"IN" => [
|
||||
'whereClause' => [
|
||||
'test' => '{value}'
|
||||
],
|
||||
],
|
||||
"NOT IN" => [
|
||||
'whereClause' => [
|
||||
'id!=s' => [
|
||||
'from' => 'TestWhere',
|
||||
'select' => ['id'],
|
||||
'whereClause' => [
|
||||
'test!=' => '{value}',
|
||||
],
|
||||
],
|
||||
],
|
||||
]
|
||||
],
|
||||
'order' => [
|
||||
'order' => [
|
||||
['test', '{direction}'],
|
||||
['t.id', '{direction}'],
|
||||
],
|
||||
'joins' => [
|
||||
['Test', 't', ['t.id:' => 'id'], ["type" => JoinType::left->value]],
|
||||
],
|
||||
],
|
||||
'select' => [
|
||||
'select' => 'MUL:(t.id, test)',
|
||||
'joins' => [
|
||||
['Test', 't', ['t.id:' => 'id']],
|
||||
],
|
||||
],
|
||||
],
|
||||
'test2' => [
|
||||
'type' => Entity::INT,
|
||||
'notStorable' => true,
|
||||
'where' => [
|
||||
'=' => [
|
||||
'whereClause' => [
|
||||
'test' => '{value}',
|
||||
'id!=' => null,
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
'test3' => [
|
||||
'type' => Entity::VARCHAR,
|
||||
'notStorable' => true,
|
||||
'where' => [
|
||||
'=' => [
|
||||
'whereClause' => [
|
||||
'test' => '{value}',
|
||||
],
|
||||
'leftJoins' => [
|
||||
['Test', 't', ['t.id:' => 'id']],
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
'relations' => [
|
||||
],
|
||||
],
|
||||
|
||||
'TestSelect' => [
|
||||
'attributes' => [
|
||||
'id' => [
|
||||
'type' => Entity::ID,
|
||||
],
|
||||
'test' => [
|
||||
'type' => Entity::VARCHAR,
|
||||
'notStorable' => true,
|
||||
'select' => [
|
||||
'select' => 'MUL:({id, 1)',
|
||||
],
|
||||
'selectForeign' => [
|
||||
'select' => 'MUL:({alias}.id, 1)',
|
||||
],
|
||||
'order' => [
|
||||
'order' => [
|
||||
['MUL:({alias}.id, 1)', '{direction}'],
|
||||
],
|
||||
],
|
||||
],
|
||||
'testAnother' => [
|
||||
'type' => Entity::VARCHAR,
|
||||
'notStorable' => true,
|
||||
'select' => [
|
||||
'select' => 'MUL:({alias}.id, 1)',
|
||||
],
|
||||
],
|
||||
],
|
||||
'relations' => [
|
||||
'right' => [
|
||||
'type' => Entity::HAS_MANY,
|
||||
'foreign' => 'left',
|
||||
'entity' => 'TestSelectRight',
|
||||
],
|
||||
],
|
||||
],
|
||||
|
||||
'TestSelectRight' => [
|
||||
'attributes' => [
|
||||
'id' => [
|
||||
'type' => Entity::ID,
|
||||
],
|
||||
'leftId' => [
|
||||
'type' => Entity::FOREIGN_ID,
|
||||
],
|
||||
],
|
||||
'relations' => [
|
||||
'left' => [
|
||||
'type' => Entity::BELONGS_TO,
|
||||
'foreign' => 'right',
|
||||
'entity' => 'TestSelect',
|
||||
],
|
||||
],
|
||||
],
|
||||
|
||||
'Category' => [
|
||||
'attributes' => [
|
||||
'id' => [
|
||||
'type' => Entity::ID,
|
||||
],
|
||||
'parentId' => [
|
||||
'type' => Entity::FOREIGN_ID,
|
||||
],
|
||||
],
|
||||
],
|
||||
];
|
||||
8
tests/unit/testData/Entities/TestEntity.php
Normal file
8
tests/unit/testData/Entities/TestEntity.php
Normal file
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
namespace tests\unit\testData\Entities;
|
||||
|
||||
use Espo\ORM\BaseEntity;
|
||||
|
||||
class TestEntity extends BaseEntity
|
||||
{}
|
||||
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
namespace tests\unit\testData\EntryPoints\Espo\EntryPoints;
|
||||
|
||||
|
||||
use Espo\Core\Api\Request;
|
||||
use Espo\Core\Api\Response;
|
||||
use Espo\Core\EntryPoint\EntryPoint;
|
||||
|
||||
class Download implements EntryPoint
|
||||
{
|
||||
public function run(Request $request, Response $response): void
|
||||
{}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
namespace tests\unit\testData\EntryPoints\Espo\EntryPoints;
|
||||
|
||||
class TestEntry
|
||||
{
|
||||
protected $authRequired = true;
|
||||
|
||||
public function run()
|
||||
{}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
namespace tests\unit\testData\EntryPoints\Espo\Modules\Crm\EntryPoints;
|
||||
|
||||
|
||||
class InModule
|
||||
{
|
||||
protected $authRequired = true;
|
||||
|
||||
public function run()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
namespace tests\unit\testData\EntryPoints\Espo\Modules\Crm\EntryPoints;
|
||||
|
||||
|
||||
class InModuleNoRunMethod
|
||||
{
|
||||
protected $authRequired = true;
|
||||
|
||||
public function noRunMethod()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
7
tests/unit/testData/EntryPoints/cache/entryPoints.php
vendored
Normal file
7
tests/unit/testData/EntryPoints/cache/entryPoints.php
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
|
||||
return array (
|
||||
'Download' => '\\tests\\unit\\testData\\EntryPoints\\Espo\\EntryPoints\\Download',
|
||||
);
|
||||
|
||||
?>
|
||||
@@ -0,0 +1 @@
|
||||
["File.json"]
|
||||
@@ -0,0 +1,3 @@
|
||||
<?php
|
||||
|
||||
//File.php
|
||||
@@ -0,0 +1 @@
|
||||
Tester.txt
|
||||
@@ -0,0 +1 @@
|
||||
["File.json"]
|
||||
@@ -0,0 +1,3 @@
|
||||
<?php
|
||||
|
||||
//File.php
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"fields": {
|
||||
"customField": {
|
||||
"type": "varchar",
|
||||
"required": false,
|
||||
"isCustom": true
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
["File.json"]
|
||||
@@ -0,0 +1,3 @@
|
||||
<?php
|
||||
|
||||
//File.php
|
||||
@@ -0,0 +1 @@
|
||||
["File.json"]
|
||||
@@ -0,0 +1,3 @@
|
||||
<?php
|
||||
|
||||
//File.php
|
||||
@@ -0,0 +1 @@
|
||||
Tester.txt
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
1
tests/unit/testData/FileManager/getContent/test.json
Normal file
1
tests/unit/testData/FileManager/getContent/test.json
Normal file
@@ -0,0 +1 @@
|
||||
{"testData":"Test"}
|
||||
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace tests\unit\testData\Hooks\testCase1\application\Espo\Hooks\Note;
|
||||
|
||||
class Mentions
|
||||
{
|
||||
public static $order = 9;
|
||||
|
||||
public function beforeSave(\Espo\ORM\Entity $entity)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace tests\unit\testData\Hooks\testCase1\application\Espo\Modules\Crm\Hooks\Note;
|
||||
|
||||
class Mentions
|
||||
{
|
||||
public static int $order = 9;
|
||||
|
||||
public function beforeSave(\Espo\ORM\Entity $entity, array $options): void
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace tests\unit\testData\Hooks\testCase1\application\Espo\Modules\Test\Hooks\Note;
|
||||
|
||||
class Mentions extends \Espo\Hooks\Note\Mentions
|
||||
{
|
||||
public static int $order = 9;
|
||||
|
||||
public function beforeSave(\Espo\ORM\Entity $entity, array $options): void
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace tests\unit\testData\Hooks\testCase1\custom\Espo\Custom\Hooks\Note;
|
||||
|
||||
class Mentions extends \Espo\Hooks\Note\Mentions
|
||||
{
|
||||
public static int $order = 7;
|
||||
|
||||
public function beforeSave(\Espo\ORM\Entity $entity, array $options): void
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace tests\unit\testData\Hooks\testCase2\application\Espo\Hooks\Note;
|
||||
|
||||
class Mentions
|
||||
{
|
||||
public static $order = 9;
|
||||
|
||||
public function beforeSave(\Espo\ORM\Entity $entity, array $options): void
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
namespace tests\unit\testData\Hooks\testCase2\application\Espo\Modules\Crm\Hooks\Note;
|
||||
|
||||
class Mentions extends \Espo\Hooks\Note\Mentions
|
||||
{
|
||||
public static int $order = 9;
|
||||
|
||||
public function beforeSave(\Espo\ORM\Entity $entity, array $options): void
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace tests\unit\testData\Hooks\testCase2\application\Espo\Modules\Test\Hooks\Note;
|
||||
|
||||
class Mentions extends \Espo\Hooks\Note\Mentions
|
||||
{
|
||||
public static int $order = 9;
|
||||
|
||||
public function beforeSave(\Espo\ORM\Entity $entity, array $options): void
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace tests\unit\testData\Hooks\testCase3\application\Espo\Hooks\Note;
|
||||
|
||||
class Mentions
|
||||
{
|
||||
public static $order = 9;
|
||||
|
||||
public function beforeSave(\Espo\ORM\Entity $entity, array $options): void
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
[
|
||||
{
|
||||
"route": "/Activities/:scope/:id/:name",
|
||||
"method": "get",
|
||||
"params": {
|
||||
"controller": "Activities",
|
||||
"action": "list",
|
||||
"scope": ":scope",
|
||||
"id": ":id",
|
||||
"name": ":name"
|
||||
},
|
||||
"noAuth": false,
|
||||
"actionClassName": ""
|
||||
},
|
||||
{
|
||||
"route": "/Activities",
|
||||
"method": "get",
|
||||
"params": {
|
||||
"controller": "Activities",
|
||||
"action": "listCalendarEvents"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,35 @@
|
||||
[
|
||||
{
|
||||
"route": "/App/user",
|
||||
"method": "get",
|
||||
"params": {
|
||||
"controller": "App",
|
||||
"action": "user"
|
||||
},
|
||||
"noAuth": false,
|
||||
"actionClassName": ""
|
||||
},
|
||||
{
|
||||
"route": "/Metadata",
|
||||
"method": "get",
|
||||
"params": {
|
||||
"controller": "Metadata"
|
||||
}
|
||||
},
|
||||
{
|
||||
"route": "/:controller/action/:action",
|
||||
"method": "post",
|
||||
"params": {
|
||||
"controller": ":controller",
|
||||
"action": ":action"
|
||||
}
|
||||
},
|
||||
{
|
||||
"route": "/:controller/action/:action",
|
||||
"method": "get",
|
||||
"params": {
|
||||
"controller": ":controller",
|
||||
"action": ":action"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,22 @@
|
||||
[
|
||||
{
|
||||
"route": "/Custom/:scope/:id/:name",
|
||||
"method": "get",
|
||||
"params": {
|
||||
"controller": "Custom",
|
||||
"action": "list",
|
||||
"scope": ":scope",
|
||||
"id": ":id",
|
||||
"name": ":name"
|
||||
},
|
||||
"noAuth": false,
|
||||
"actionClassName": ""
|
||||
},
|
||||
{
|
||||
"route": "/Test",
|
||||
"method": "get",
|
||||
"params": {
|
||||
"controller": "TestOverridden"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,22 @@
|
||||
[
|
||||
{
|
||||
"route":"/Activities/:scope/:id/:name",
|
||||
"method":"get",
|
||||
"params":{
|
||||
"controller":"Activities",
|
||||
"action":"list",
|
||||
"scope":":scope",
|
||||
"id":":id",
|
||||
"name":":name"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"route":"/Activities",
|
||||
"method":"get",
|
||||
"params":{
|
||||
"controller":"Activities",
|
||||
"action":"listCalendarEvents"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,10 @@
|
||||
[
|
||||
{
|
||||
"route":"/Test",
|
||||
"method":"get",
|
||||
"params":{
|
||||
"controller":"Test",
|
||||
"action":"listCalendarEvents"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,37 @@
|
||||
[
|
||||
{
|
||||
"route":"/App/user",
|
||||
"method":"get",
|
||||
"params":{
|
||||
"controller":"App",
|
||||
"action":"user"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"route":"/Metadata",
|
||||
"method":"get",
|
||||
"params":{
|
||||
"controller":"Metadata"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"route":"/:controller/action/:action",
|
||||
"method":"post",
|
||||
"params":{
|
||||
"controller":":controller",
|
||||
"action":":action"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"route":"/:controller/action/:action",
|
||||
"method":"get",
|
||||
"params":{
|
||||
"controller":":controller",
|
||||
"action":":action"
|
||||
}
|
||||
}
|
||||
|
||||
]
|
||||
@@ -0,0 +1,23 @@
|
||||
[
|
||||
{
|
||||
"route": "/Activities/:scope/:id/:name",
|
||||
"method": "get",
|
||||
"params": {
|
||||
"controller": "Activities",
|
||||
"action": "list",
|
||||
"scope": ":scope",
|
||||
"id": ":id",
|
||||
"name": ":name"
|
||||
},
|
||||
"noAuth": false,
|
||||
"actionClassName": ""
|
||||
},
|
||||
{
|
||||
"route": "/Activities",
|
||||
"method": "get",
|
||||
"params": {
|
||||
"controller": "Activities",
|
||||
"action": "listCalendarEvents"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,23 @@
|
||||
[
|
||||
{
|
||||
"route": "/Activities/:scope/:id/:name",
|
||||
"method": "get",
|
||||
"params": {
|
||||
"controller": "Test",
|
||||
"action": "list",
|
||||
"scope": ":scope",
|
||||
"id": ":id",
|
||||
"name": ":name"
|
||||
},
|
||||
"noAuth": false,
|
||||
"actionClassName": ""
|
||||
},
|
||||
{
|
||||
"route": "/Test",
|
||||
"method": "get",
|
||||
"params": {
|
||||
"controller": "Test",
|
||||
"action": "listCalendarEvents"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,37 @@
|
||||
[
|
||||
{
|
||||
"route":"/App/user",
|
||||
"method":"get",
|
||||
"params":{
|
||||
"controller":"App",
|
||||
"action":"user"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"route":"/Metadata",
|
||||
"method":"get",
|
||||
"params":{
|
||||
"controller":"Metadata"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"route":"/:controller/action/:action",
|
||||
"method":"post",
|
||||
"params":{
|
||||
"controller":":controller",
|
||||
"action":":action"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"route":"/:controller/action/:action",
|
||||
"method":"get",
|
||||
"params":{
|
||||
"controller":":controller",
|
||||
"action":":action"
|
||||
}
|
||||
}
|
||||
|
||||
]
|
||||
105
tests/unit/testData/Utils/Config/config.php
Normal file
105
tests/unit/testData/Utils/Config/config.php
Normal file
@@ -0,0 +1,105 @@
|
||||
<?php
|
||||
|
||||
return array (
|
||||
'cacheTimestamp' => 1412600573,
|
||||
'removeOption' => 'Test',
|
||||
'testOption' => 'Another Wrong Value',
|
||||
'testOption2' => 'Test2',
|
||||
'database' =>
|
||||
array (
|
||||
'driver' => 'pdo_mysql',
|
||||
'host' => 'localhost',
|
||||
'dbname' => 'espocrm',
|
||||
'user' => 'root',
|
||||
'password' => '',
|
||||
),
|
||||
'useCache' => false,
|
||||
'recordsPerPage' => 20,
|
||||
'recordsPerPageSmall' => 5,
|
||||
'applicationName' => 'EspoCRM',
|
||||
'version' => '1.0',
|
||||
'timeZone' => 'UTC',
|
||||
'dateFormat' => 'YYYY-MM-DD',
|
||||
'timeFormat' => 'HH:mm',
|
||||
'weekStart' => 1,
|
||||
'thousandSeparator' => ',',
|
||||
'decimalMark' => '.',
|
||||
'currencyList' =>
|
||||
array (
|
||||
0 => 'USD',
|
||||
1 => 'EUR',
|
||||
),
|
||||
'defaultCurrency' => 'USD',
|
||||
'currency' =>
|
||||
array (
|
||||
'base' => 'USD',
|
||||
'rate' =>
|
||||
array (
|
||||
'EUR' => '1.37',
|
||||
),
|
||||
),
|
||||
'outboundEmailIsShared' => true,
|
||||
'outboundEmailFromName' => 'EspoCRM',
|
||||
'outboundEmailFromAddress' => '',
|
||||
'languageList' =>
|
||||
array (
|
||||
0 => 'en_US',
|
||||
),
|
||||
'language' => 'en_US',
|
||||
'logger' =>
|
||||
array (
|
||||
'path' => 'data/logs/espo.log',
|
||||
'level' => 'INFO',
|
||||
'isRotate' => true,
|
||||
'maxRotateFiles' => 5,
|
||||
),
|
||||
'defaultPermissions' =>
|
||||
array (
|
||||
'dir' => '0775',
|
||||
'file' => '0664',
|
||||
'user' => '',
|
||||
'group' => '',
|
||||
),
|
||||
'cron' =>
|
||||
array (
|
||||
'maxJobNumber' => 15,
|
||||
'jobPeriod' => 7800,
|
||||
'minExecutionTime' => 50,
|
||||
),
|
||||
'globalSearchEntityList' =>
|
||||
array (
|
||||
0 => 'Account',
|
||||
1 => 'Contact',
|
||||
2 => 'Lead',
|
||||
3 => 'Prospect',
|
||||
4 => 'Opportunity',
|
||||
),
|
||||
'tabList' =>
|
||||
array (
|
||||
0 => 'Contact',
|
||||
1 => 'Account',
|
||||
2 => 'Lead',
|
||||
3 => 'Opportunity',
|
||||
4 => 'Calendar',
|
||||
5 => 'Meeting',
|
||||
6 => 'Call',
|
||||
7 => 'Task',
|
||||
8 => 'Case',
|
||||
9 => 'Prospect',
|
||||
),
|
||||
'quickCreateList' =>
|
||||
array (
|
||||
0 => 'Account',
|
||||
1 => 'Contact',
|
||||
2 => 'Lead',
|
||||
3 => 'Opportunity',
|
||||
4 => 'Meeting',
|
||||
5 => 'Call',
|
||||
6 => 'Task',
|
||||
7 => 'Case',
|
||||
8 => 'Prospect',
|
||||
),
|
||||
'isInstalled' => true,
|
||||
);
|
||||
|
||||
?>
|
||||
56
tests/unit/testData/Utils/Config/defaultConfig.php
Normal file
56
tests/unit/testData/Utils/Config/defaultConfig.php
Normal file
@@ -0,0 +1,56 @@
|
||||
<?php
|
||||
|
||||
return array (
|
||||
'configPath' => 'tests/testData/Utils/Config/config.php',
|
||||
|
||||
'dateFormat' => 'MM/DD/YYYY',
|
||||
'timeFormat' => 'HH:mm',
|
||||
|
||||
'cron' => array(
|
||||
'maxJobNumber' => 15, /*Max number of jobs per one execution*/
|
||||
'jobPeriod' => 7800, /*Period for jobs, ex. if cron executed at 15:35, it will execute all pending jobs for times from 14:05 to 15:35*/
|
||||
'minExecutionTime' => 50, /*to avoid too frequency execution*/
|
||||
),
|
||||
|
||||
'systemUser' => array(
|
||||
'id' => 'system',
|
||||
'userName' => 'system',
|
||||
'firstName' => '',
|
||||
'lastName' => 'System',
|
||||
),
|
||||
|
||||
'crud' => array(
|
||||
'get' => 'read',
|
||||
'post' => 'create',
|
||||
'put' => 'update',
|
||||
'patch' => 'patch',
|
||||
'delete' => 'delete',
|
||||
),
|
||||
'systemItems' =>
|
||||
array (
|
||||
'systemItems',
|
||||
'adminItems',
|
||||
'configPath',
|
||||
'cachePath',
|
||||
'database',
|
||||
'customPath',
|
||||
'defaultsPath',
|
||||
'crud',
|
||||
),
|
||||
'adminItems' =>
|
||||
array (
|
||||
'defaultPermissions',
|
||||
'logger',
|
||||
'devMode',
|
||||
),
|
||||
'currency' =>
|
||||
array(
|
||||
'base' => 'USD',
|
||||
'rate' => array(
|
||||
'EUR' => 1.37,
|
||||
'GBP' => 1.67,
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
?>
|
||||
56
tests/unit/testData/Utils/Config/defaultConfigArray.php
Normal file
56
tests/unit/testData/Utils/Config/defaultConfigArray.php
Normal file
@@ -0,0 +1,56 @@
|
||||
<?php
|
||||
|
||||
return array (
|
||||
'configPath' => 'tests/testData/Utils/Config/testArray.php',
|
||||
|
||||
'dateFormat' => 'MM/DD/YYYY',
|
||||
'timeFormat' => 'HH:mm',
|
||||
|
||||
'cron' => array(
|
||||
'maxJobNumber' => 15, /*Max number of jobs per one execution*/
|
||||
'jobPeriod' => 7800, /*Period for jobs, ex. if cron executed at 15:35, it will execute all pending jobs for times from 14:05 to 15:35*/
|
||||
'minExecutionTime' => 50, /*to avoid too frequency execution*/
|
||||
),
|
||||
|
||||
'systemUser' => array(
|
||||
'id' => 'system',
|
||||
'userName' => 'system',
|
||||
'firstName' => '',
|
||||
'lastName' => 'System',
|
||||
),
|
||||
|
||||
'crud' => array(
|
||||
'get' => 'read',
|
||||
'post' => 'create',
|
||||
'put' => 'update',
|
||||
'patch' => 'patch',
|
||||
'delete' => 'delete',
|
||||
),
|
||||
'systemItems' =>
|
||||
array (
|
||||
'systemItems',
|
||||
'adminItems',
|
||||
'configPath',
|
||||
'cachePath',
|
||||
'database',
|
||||
'customPath',
|
||||
'defaultsPath',
|
||||
'crud',
|
||||
),
|
||||
'adminItems' =>
|
||||
array (
|
||||
'defaultPermissions',
|
||||
'logger',
|
||||
'devMode',
|
||||
),
|
||||
'currency' =>
|
||||
array(
|
||||
'base' => 'USD',
|
||||
'rate' => array(
|
||||
'EUR' => 1.37,
|
||||
'GBP' => 1.67,
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
?>
|
||||
99
tests/unit/testData/Utils/Config/systemConfig.php
Normal file
99
tests/unit/testData/Utils/Config/systemConfig.php
Normal file
@@ -0,0 +1,99 @@
|
||||
<?php
|
||||
/************************************************************************
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM – Open Source CRM application.
|
||||
* Copyright (C) 2014-2026 EspoCRM, Inc.
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
|
||||
************************************************************************/
|
||||
|
||||
return array (
|
||||
'defaultPermissions' =>
|
||||
array (
|
||||
'dir' => '0775',
|
||||
'file' => '0664',
|
||||
'user' => '',
|
||||
'group' => '',
|
||||
),
|
||||
'cron' => array(
|
||||
'maxJobNumber' => 15, /** Max number of jobs per one execution */
|
||||
'jobPeriod' => 7800, /** Period for jobs, ex. if cron executed at 15:35, it will execute all pending jobs for times from 14:05 to 15:35 */
|
||||
'minExecutionTime' => 50, /** to avoid too frequency execution **/
|
||||
),
|
||||
'crud' => array(
|
||||
'get' => 'read',
|
||||
'post' => 'create',
|
||||
'put' => 'update',
|
||||
'patch' => 'patch',
|
||||
'delete' => 'delete',
|
||||
),
|
||||
'systemUser' => array(
|
||||
'id' => 'system',
|
||||
'userName' => 'system',
|
||||
'firstName' => '',
|
||||
'lastName' => 'System',
|
||||
),
|
||||
'systemItems' =>
|
||||
array (
|
||||
'systemItems',
|
||||
'adminItems',
|
||||
'configPath',
|
||||
'cachePath',
|
||||
'database',
|
||||
'crud',
|
||||
'logger',
|
||||
'isInstalled',
|
||||
'defaultPermissions',
|
||||
'systemUser',
|
||||
'userItems',
|
||||
),
|
||||
'adminItems' =>
|
||||
array (
|
||||
'devMode',
|
||||
'outboundEmailIsShared',
|
||||
'outboundEmailFromName',
|
||||
'outboundEmailFromAddress',
|
||||
'smtpServer',
|
||||
'smtpPort',
|
||||
'smtpAuth',
|
||||
'smtpSecurity',
|
||||
'smtpUsername',
|
||||
'smtpPassword',
|
||||
'cron',
|
||||
),
|
||||
'userItems' =>
|
||||
array (
|
||||
'currencyList',
|
||||
'addressFormat',
|
||||
'quickCreateList',
|
||||
'recordsPerPage',
|
||||
'recordsPerPageSmall',
|
||||
'tabList',
|
||||
'thousandSeparator',
|
||||
'timeFormat',
|
||||
'timeZone',
|
||||
'weekStart'
|
||||
),
|
||||
'isInstalled' => false,
|
||||
);
|
||||
|
||||
8
tests/unit/testData/Utils/Config/testArray.php
Normal file
8
tests/unit/testData/Utils/Config/testArray.php
Normal file
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
return array (
|
||||
'testOption' => 'Another Wrong Value',
|
||||
'testOption2' => 'Test2',
|
||||
);
|
||||
|
||||
?>
|
||||
18
tests/unit/testData/Utils/Database/Schema/Tables/Comment.php
Normal file
18
tests/unit/testData/Utils/Database/Schema/Tables/Comment.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
|
||||
'Comment' => array(
|
||||
'fields' => array(
|
||||
'id' => array(
|
||||
'type' => 'id',
|
||||
),
|
||||
'name' => array(
|
||||
'type' => 'varchar',
|
||||
'len' => '100',
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
);
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
|
||||
'Subscription' => array(
|
||||
'fields' => array(
|
||||
'id' => array(
|
||||
'type' => 'id',
|
||||
'dbType' => 'int',
|
||||
'len' => '11',
|
||||
'autoincrement' => true,
|
||||
'unique' => true,
|
||||
),
|
||||
'entityId' => array(
|
||||
'type' => 'varchar',
|
||||
'len' => '24',
|
||||
'index' => 'entity',
|
||||
),
|
||||
'entityType' => array(
|
||||
'type' => 'varchar',
|
||||
'len' => '100',
|
||||
'index' => 'entity',
|
||||
),
|
||||
'userId' => array(
|
||||
'type' => 'varchar',
|
||||
'len' => '24',
|
||||
'index' => true,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
);
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"fields": {
|
||||
"name":"Account",
|
||||
"label":"Custom"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"fields": {
|
||||
"name":"Contact",
|
||||
"label":"Custom"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"fields": {
|
||||
"name":"Account",
|
||||
"label":"Custom"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"fields": {
|
||||
"name":"Contact",
|
||||
"label":"Custom"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"fields": {
|
||||
"name":"Account",
|
||||
"label":"Crm Module",
|
||||
"source":"Crm Module"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"fields": {
|
||||
"name":"Contact",
|
||||
"label":"Crm Module",
|
||||
"source":"Crm Module"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"fields": {
|
||||
"name":"Account",
|
||||
"label":"Crm Module",
|
||||
"source":"Crm Module"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"fields": {
|
||||
"name":"Contact",
|
||||
"label":"Crm Module",
|
||||
"source":"Crm Module"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"fields": {
|
||||
"name":"User",
|
||||
"label":"Core",
|
||||
"source":"Core"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"options": {
|
||||
"language": {
|
||||
"en_US": "English (United States)"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"fields": {
|
||||
"name":"User",
|
||||
"label":"Core",
|
||||
"source":"Core"
|
||||
}
|
||||
}
|
||||
5151
tests/unit/testData/Utils/Metadata/metadata.php
Normal file
5151
tests/unit/testData/Utils/Metadata/metadata.php
Normal file
File diff suppressed because it is too large
Load Diff
4950
tests/unit/testData/Utils/Metadata/ormMetadata.php
Normal file
4950
tests/unit/testData/Utils/Metadata/ormMetadata.php
Normal file
File diff suppressed because it is too large
Load Diff
0
tests/unit/testData/cache/.data
vendored
Normal file
0
tests/unit/testData/cache/.data
vendored
Normal file
Reference in New Issue
Block a user