formula: record related columnData

This commit is contained in:
Yuri Kuznetsov
2025-12-05 12:23:29 +02:00
parent 914cecca10
commit a2cd2531d0
2 changed files with 35 additions and 3 deletions
@@ -697,6 +697,29 @@ class FormulaTest extends BaseTestCase
$this->assertEquals('test', $value);
}
/** @noinspection PhpUnhandledExceptionInspection */
public function testRecordRelateWithColumnData(): void
{
$fm = $this->getContainer()->getByClass(Manager::class);
$em = $this->getContainer()->getByClass(EntityManager::class);
$a = $em->createEntity('Account');
$c = $em->createEntity('Contact');
$script = "
\$data = object\\create();
\$data['role'] = 'Tester';
record\\relate('Account', '{$a->getId()}', 'contacts', '{$c->getId()}', \$data);
";
$fm->run($script);
$value = $em->getRelation($a, 'contacts')->getColumnById($c->getId(), 'role');
$this->assertEquals('Tester', $value);
}
public function testExtAccountFindByEmailAddress()
{
$fm = $this->getContainer()->get('formulaManager');