3
3
* Copyright © Magento, Inc. All rights reserved.
4
4
* See COPYING.txt for license details.
5
5
*/
6
+ declare (strict_types=1 );
6
7
7
8
namespace Magento \Framework \Setup \Test \Unit ;
8
9
@@ -30,7 +31,7 @@ class SchemaListenerTest extends \PHPUnit\Framework\TestCase
30
31
*/
31
32
private $ objectManagerHelper ;
32
33
33
- protected function setUp ()
34
+ protected function setUp () : void
34
35
{
35
36
$ this ->objectManagerHelper = new ObjectManagerHelper ($ this );
36
37
$ this ->model = $ this ->objectManagerHelper ->getObject (
@@ -51,7 +52,7 @@ protected function setUp()
51
52
/**
52
53
* @return Table
53
54
*/
54
- private function getCreateTableDDL ($ tableName )
55
+ private function getCreateTableDDL ($ tableName ) : Table
55
56
{
56
57
$ table = new Table ();
57
58
$ table ->setName ($ tableName );
@@ -91,7 +92,7 @@ private function getCreateTableDDL($tableName)
91
92
);
92
93
}
93
94
94
- public function testRenameTable ()
95
+ public function testRenameTable () : void
95
96
{
96
97
$ this ->model ->setModuleName ('First_Module ' );
97
98
$ this ->model ->createTable ($ this ->getCreateTableDDL ('old_table ' ));
@@ -101,15 +102,15 @@ public function testRenameTable()
101
102
self ::assertArrayNotHasKey ('old_table ' , $ tables ['First_Module ' ]);
102
103
}
103
104
104
- public function testDropIndex ()
105
+ public function testDropIndex () : void
105
106
{
106
107
$ this ->model ->setModuleName ('First_Module ' );
107
108
$ this ->model ->createTable ($ this ->getCreateTableDDL ('index_table ' ));
108
109
$ this ->model ->dropIndex ('index_table ' , 'INDEX_KEY ' , 'index ' );
109
110
self ::assertTrue ($ this ->model ->getTables ()['First_Module ' ]['index_table ' ]['indexes ' ]['INDEX_KEY ' ]['disabled ' ]);
110
111
}
111
112
112
- public function testCreateTable ()
113
+ public function testCreateTable () : void
113
114
{
114
115
$ this ->model ->setModuleName ('First_Module ' );
115
116
$ this ->model ->createTable ($ this ->getCreateTableDDL ('new_table ' ));
@@ -201,7 +202,7 @@ public function testCreateTable()
201
202
);
202
203
}
203
204
204
- public function testDropTable ()
205
+ public function testDropTable () : void
205
206
{
206
207
$ this ->model ->setModuleName ('Old_Module ' );
207
208
$ this ->model ->createTable ($ this ->getCreateTableDDL ('old_table ' ));
@@ -210,7 +211,7 @@ public function testDropTable()
210
211
self ::assertTrue ($ this ->model ->getTables ()['New_Module ' ]['old_table ' ]['disabled ' ]);
211
212
}
212
213
213
- public function testDropTableInSameModule ()
214
+ public function testDropTableInSameModule () : void
214
215
{
215
216
$ this ->model ->setModuleName ('Old_Module ' );
216
217
$ this ->model ->createTable ($ this ->getCreateTableDDL ('old_table ' ));
0 commit comments