33 * Copyright © Magento, Inc. All rights reserved.
44 * See COPYING.txt for license details.
55 */
6+ declare (strict_types=1 );
67
7- namespace Magento \Framework \Test \Unit \ Setup ;
8+ namespace Magento \Framework \Setup \ Test \Unit ;
89
910use Magento \Framework \DB \Ddl \Table ;
1011use Magento \Framework \Setup \SchemaListenerDefinition \BooleanDefinition ;
1617/**
1718 * Unit test for schema listener.
1819 *
19- * @package Magento\Framework\Test\Unit\Setup
20+ * @package Magento\Framework\Setup\ Test\Unit
2021 */
2122class SchemaListenerTest extends \PHPUnit \Framework \TestCase
2223{
@@ -30,7 +31,7 @@ class SchemaListenerTest extends \PHPUnit\Framework\TestCase
3031 */
3132 private $ objectManagerHelper ;
3233
33- protected function setUp ()
34+ protected function setUp () : void
3435 {
3536 $ this ->objectManagerHelper = new ObjectManagerHelper ($ this );
3637 $ this ->model = $ this ->objectManagerHelper ->getObject (
@@ -51,7 +52,7 @@ protected function setUp()
5152 /**
5253 * @return Table
5354 */
54- private function getCreateTableDDL ($ tableName )
55+ private function getCreateTableDDL ($ tableName ) : Table
5556 {
5657 $ table = new Table ();
5758 $ table ->setName ($ tableName );
@@ -91,7 +92,7 @@ private function getCreateTableDDL($tableName)
9192 );
9293 }
9394
94- public function testRenameTable ()
95+ public function testRenameTable () : void
9596 {
9697 $ this ->model ->setModuleName ('First_Module ' );
9798 $ this ->model ->createTable ($ this ->getCreateTableDDL ('old_table ' ));
@@ -101,15 +102,15 @@ public function testRenameTable()
101102 self ::assertArrayNotHasKey ('old_table ' , $ tables ['First_Module ' ]);
102103 }
103104
104- public function testDropIndex ()
105+ public function testDropIndex () : void
105106 {
106107 $ this ->model ->setModuleName ('First_Module ' );
107108 $ this ->model ->createTable ($ this ->getCreateTableDDL ('index_table ' ));
108109 $ this ->model ->dropIndex ('index_table ' , 'INDEX_KEY ' , 'index ' );
109110 self ::assertTrue ($ this ->model ->getTables ()['First_Module ' ]['index_table ' ]['indexes ' ]['INDEX_KEY ' ]['disabled ' ]);
110111 }
111112
112- public function testCreateTable ()
113+ public function testCreateTable () : void
113114 {
114115 $ this ->model ->setModuleName ('First_Module ' );
115116 $ this ->model ->createTable ($ this ->getCreateTableDDL ('new_table ' ));
@@ -125,7 +126,7 @@ public function testCreateTable()
125126 'nullable ' => false ,
126127 'default ' => 'CURRENT_TIMESTAMP ' ,
127128 'disabled ' => false ,
128- 'onCreate ' => NULL ,
129+ 'onCreate ' => null ,
129130 ],
130131 'integer ' =>
131132 [
@@ -135,9 +136,9 @@ public function testCreateTable()
135136 'unsigned ' => false ,
136137 'nullable ' => false ,
137138 'identity ' => true ,
138- 'default ' => NULL ,
139+ 'default ' => null ,
139140 'disabled ' => false ,
140- 'onCreate ' => NULL ,
141+ 'onCreate ' => null ,
141142 ],
142143 'decimal ' =>
143144 [
@@ -147,9 +148,9 @@ public function testCreateTable()
147148 'precision ' => '25 ' ,
148149 'unsigned ' => false ,
149150 'nullable ' => false ,
150- 'default ' => NULL ,
151+ 'default ' => null ,
151152 'disabled ' => false ,
152- 'onCreate ' => NULL ,
153+ 'onCreate ' => null ,
153154 ],
154155 ],
155156 $ tables ['First_Module ' ]['new_table ' ]['columns ' ]
@@ -201,7 +202,7 @@ public function testCreateTable()
201202 );
202203 }
203204
204- public function testDropTable ()
205+ public function testDropTable () : void
205206 {
206207 $ this ->model ->setModuleName ('Old_Module ' );
207208 $ this ->model ->createTable ($ this ->getCreateTableDDL ('old_table ' ));
@@ -210,7 +211,7 @@ public function testDropTable()
210211 self ::assertTrue ($ this ->model ->getTables ()['New_Module ' ]['old_table ' ]['disabled ' ]);
211212 }
212213
213- public function testDropTableInSameModule ()
214+ public function testDropTableInSameModule () : void
214215 {
215216 $ this ->model ->setModuleName ('Old_Module ' );
216217 $ this ->model ->createTable ($ this ->getCreateTableDDL ('old_table ' ));
0 commit comments