File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44namespace Test \Phinx \Db \Table ;
55
66use Phinx \Config \FeatureFlags ;
7+ use Phinx \Db \Adapter \MysqlAdapter ;
78use Phinx \Db \Table \Column ;
89use PHPUnit \Framework \TestCase ;
910use RuntimeException ;
@@ -50,4 +51,22 @@ public function testColumnNullFeatureFlag()
5051 $ column = new Column ();
5152 $ this ->assertFalse ($ column ->isNull ());
5253 }
54+
55+ public function testSetAlgorithm (): void
56+ {
57+ $ column = new Column ();
58+ $ this ->assertNull ($ column ->getAlgorithm ());
59+
60+ $ column ->setOptions (['algorithm ' => MysqlAdapter::ALGORITHM_INPLACE ]);
61+ $ this ->assertSame (MysqlAdapter::ALGORITHM_INPLACE , $ column ->getAlgorithm ());
62+ }
63+
64+ public function testSetLock (): void
65+ {
66+ $ column = new Column ();
67+ $ this ->assertNull ($ column ->getLock ());
68+
69+ $ column ->setOptions (['lock ' => MysqlAdapter::LOCK_NONE ]);
70+ $ this ->assertSame (MysqlAdapter::LOCK_NONE , $ column ->getLock ());
71+ }
5372}
You can’t perform that action at this time.
0 commit comments