summaryrefslogtreecommitdiffstats
path: root/tests/Components/CreateDefinitionTest.php
diff options
context:
space:
mode:
authorMaurício Meneghini Fauth <mauricio@fauth.dev>2019-12-16 16:08:16 -0300
committerMaurício Meneghini Fauth <mauricio@fauth.dev>2019-12-16 16:08:16 -0300
commit2ce3ddecec1721a494a2557a9e628e6142fbe5c6 (patch)
treec3f19585aaeaa4cbee4b6bd5c6c345793dad7239 /tests/Components/CreateDefinitionTest.php
parentfa8b1dd561e954c75015f8c7745b3d8713342d94 (diff)
downloadsql-parser-2ce3ddecec1721a494a2557a9e628e6142fbe5c6.zip
sql-parser-2ce3ddecec1721a494a2557a9e628e6142fbe5c6.tar.gz
sql-parser-2ce3ddecec1721a494a2557a9e628e6142fbe5c6.tar.bz2
Add PHPStan at level 2
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
Diffstat (limited to 'tests/Components/CreateDefinitionTest.php')
-rw-r--r--tests/Components/CreateDefinitionTest.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/Components/CreateDefinitionTest.php b/tests/Components/CreateDefinitionTest.php
index a1f50b8..d0718c8 100644
--- a/tests/Components/CreateDefinitionTest.php
+++ b/tests/Components/CreateDefinitionTest.php
@@ -5,6 +5,7 @@ namespace PhpMyAdmin\SqlParser\Tests\Components;
use PhpMyAdmin\SqlParser\Components\CreateDefinition;
use PhpMyAdmin\SqlParser\Parser;
+use PhpMyAdmin\SqlParser\Statements\CreateStatement;
use PhpMyAdmin\SqlParser\Tests\TestCase;
class CreateDefinitionTest extends TestCase
@@ -59,6 +60,7 @@ class CreateDefinitionTest extends TestCase
'CONSTRAINT `fk_payment_customer` FOREIGN KEY (`customer_id`) REFERENCES `customer` (`customer_id`) ON UPDATE CASCADE' .
') ENGINE=InnoDB"'
);
+ $this->assertInstanceOf(CreateStatement::class, $parser->statements[0]);
$this->assertEquals(
'CONSTRAINT `fk_payment_customer` FOREIGN KEY (`customer_id`) REFERENCES `customer` (`customer_id`) ON UPDATE CASCADE',
CreateDefinition::build($parser->statements[0]->fields[1])
@@ -75,6 +77,7 @@ class CreateDefinitionTest extends TestCase
'CONSTRAINT `fk_payment_customer` FOREIGN KEY (`customer_id`) REFERENCES `customer` (`customer_id`) ON UPDATE CASCADE' .
') ENGINE=InnoDB"'
);
+ $this->assertInstanceOf(CreateStatement::class, $parser->statements[0]);
$this->assertEquals(
'CONSTRAINT `fk_payment_customer` FOREIGN KEY (`customer_id`) REFERENCES `customer` (`customer_id`) ON UPDATE CASCADE',
CreateDefinition::build($parser->statements[0]->fields[2])