'1', 'float_value' => '2', 'json_value' => ['a' => 1, 'b' => 2], 'array_value' => ['a' => 1, 'b' => 2], 'date_value' => '2020-11-27 15:08:25', 'datetime_value' => '2020-11-27 15:08:25', 'timestamp_value' => '1606460910' ]; protected function setUp(): void { parent::setUp(); // TODO: Change the autogenerated stub $config = new Config(MYSQL_CONFIG); $config->setReturnCollection(true); $this->connection = new Connection($config); DbManager::getInstance()->addConnection($this->connection); $connection = DbManager::getInstance()->getConnection(); $this->assertTrue($connection === $this->connection); } public function testInt() { $id = CastsModel::create()->data($this->data)->save(); $this->assertIsInt(CastsModel::create()->get($id)->int_value); $this->assertIsInt(CastsModel::create()->get($id)->getAttr('int_value')); } public function testFloat() { $id = CastsModel::create()->data($this->data)->save(); $this->assertIsFloat(CastsModel::create()->get($id)->float_value); $this->assertIsFloat(CastsModel::create()->get($id)->getAttr('float_value')); } public function testJson() { $id = CastsModel::create()->data($this->data)->save(); $this->assertIsObject(CastsModel::create()->get($id)->json_value); $this->assertIsObject(CastsModel::create()->get($id)->getAttr('json_value')); } public function testArray() { $id = CastsModel::create()->data($this->data)->save(); $this->assertIsArray(CastsModel::create()->get($id)->array_value); $this->assertIsArray(CastsModel::create()->get($id)->getAttr('array_value')); } }