Magento Extensions Rating 2024
EXTENSIONS BY CATEGORY
B2B (Business-To-Business)
Blog
Customer
ERP (Enterprise Resource Planning)
Mega Menu
One Step Checkout
Order
POS (Point Of Sale)
Search
Shopping Cart
Sitemap
SEO
Social
Stock & Inventory Management
EXTENSIONS BY DEVELOPER
aheadWorks
Amasty
Boost My Shop
BSS Commerce
Magestore
MageWorx
Mirasvit
Templates Master
Wyomind
XTENTO
Magento 2 Documentation
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
vendor
magento
framework
DB
Test
Unit
Sql
LimitExpressionTest.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Framework\DB\Test\Unit\Sql
;
7
8
class
LimitExpressionTest
extends
\PHPUnit\Framework\TestCase
9
{
14
public
function
testToStringExceptionCount
()
15
{
16
$sql =
'test sql'
;
17
$count
= 0;
18
$model
= new \Magento\Framework\DB\Sql\LimitExpression($sql,
$count
);
19
$model
->__toString();
20
}
21
26
public
function
testToStringExceptionOffset
()
27
{
28
$sql =
'test sql'
;
29
$count
= 1;
30
$offset = -1;
31
$model
= new \Magento\Framework\DB\Sql\LimitExpression($sql,
$count
, $offset);
32
$model
->__toString();
33
}
34
35
public
function
testToString
()
36
{
37
$sql =
'select * from test_table'
;
38
$count
= 1;
39
$offset = 1;
40
$model
= new \Magento\Framework\DB\Sql\LimitExpression($sql,
$count
, $offset);
41
$this->assertEquals(
'select * from test_table LIMIT 1 OFFSET 1'
,
$model
->__toString());
42
}
43
}
Magento\Framework\DB\Test\Unit\Sql
Definition:
LimitExpressionTest.php:6
Magento\Framework\DB\Test\Unit\Sql\LimitExpressionTest
Definition:
LimitExpressionTest.php:8
$model
$model
Definition:
enable_catalog_product_reindex_schedule.php:9
$count
$count
Definition:
recent.phtml:13
Magento\Framework\DB\Test\Unit\Sql\LimitExpressionTest\testToString
testToString()
Definition:
LimitExpressionTest.php:35
Magento\Framework\DB\Test\Unit\Sql\LimitExpressionTest\testToStringExceptionOffset
testToStringExceptionOffset()
Definition:
LimitExpressionTest.php:26
Magento\Framework\DB\Test\Unit\Sql\LimitExpressionTest\testToStringExceptionCount
testToStringExceptionCount()
Definition:
LimitExpressionTest.php:14