. * * 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. ************************************************************************/ namespace tests\integration\Espo\ORM; use Espo\ORM\EntityManager; use Espo\ORM\Query\Part\Selection; class FunctionConverterTest extends \tests\integration\Core\BaseTestCase { public function testAbs(): void { $app = $this->createApplication(); /** @var EntityManager $entityManager */ $entityManager = $app->getContainer()->get('entityManager'); $query = $entityManager->getQueryBuilder() ->select(Selection::fromString('ABS:(-1)')->withAlias('value')) ->build(); $sth = $entityManager->getQueryExecutor()->execute($query); $value = $sth->fetch()['value']; $this->assertEquals('1', $value); } }