diff --git a/.gitattributes b/.gitattributes index 8af211b1..59661532 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,4 +1,2 @@ .gitattributes export-ignore .gitignore export-ignore -.travis.yml export-ignore -tests/ export-ignore diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 23576f1b..00000000 --- a/.travis.yml +++ /dev/null @@ -1,24 +0,0 @@ -language: php -php: - - 5.3.3 - - 5.4 - - 5.5 - - 5.6 - - hhvm - -matrix: - allow_failures: - - php: hhvm - -script: - - vendor/bin/tester tests -s -c tests/php-unix.ini - - php code-checker/src/code-checker.php - -after_failure: - # Print *.actual content - - for i in $(find tests -name \*.actual); do echo "--- $i"; cat $i; echo; echo; done - -before_script: - # Install Nette Tester & Code Checker - - composer install --no-interaction --dev --prefer-source - - composer create-project nette/code-checker code-checker ~2.3 --no-interaction --prefer-source diff --git a/composer.json b/composer.json index a3a2ad37..4590f283 100644 --- a/composer.json +++ b/composer.json @@ -14,8 +14,7 @@ "php": ">=5.2.0" }, "require-dev": { - "tracy/tracy": "~2.2", - "nette/tester": "~1.1" + "tracy/tracy": "~2.2" }, "replace": { "dg/dibi": "self.version" diff --git a/readme.md b/readme.md index 82e22ebd..3d6e03d8 100644 --- a/readme.md +++ b/readme.md @@ -2,7 +2,6 @@ ========================================================= [![Downloads this Month](https://img.shields.io/packagist/dm/dibi/dibi.svg)](https://packagist.org/packages/dibi/dibi) -[![Build Status](https://travis-ci.org/dg/dibi.svg?branch=master)](https://travis-ci.org/dg/dibi) Database access functions in PHP are not standardised. This library hides the differences between them, and above all, it gives you a very handy interface. diff --git a/tests/.gitignore b/tests/.gitignore deleted file mode 100644 index 2c211780..00000000 --- a/tests/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -/*/output -/coverage.dat -/test.log -/tmp diff --git a/tests/dibi/DibiFluent.cloning.phpt b/tests/dibi/DibiFluent.cloning.phpt deleted file mode 100644 index 39b346e4..00000000 --- a/tests/dibi/DibiFluent.cloning.phpt +++ /dev/null @@ -1,40 +0,0 @@ -select('*')->from('table')->where('x=1'); -$dolly = clone $fluent; -$dolly->where('y=1'); -$dolly->clause('FOO'); - -Assert::same( 'SELECT * FROM [table] WHERE x=1', (string) $fluent ); -Assert::same( 'SELECT * FROM [table] WHERE x=1 AND y=1 FOO', (string) $dolly ); - - -$fluent = dibi::select('id')->from('table')->where('id = %i',1); -$dolly = clone $fluent; -$dolly->where('cd = %i',5); - -Assert::same( 'SELECT [id] FROM [table] WHERE id = 1', (string) $fluent ); -Assert::same( 'SELECT [id] FROM [table] WHERE id = 1 AND cd = 5', (string) $dolly ); - - -$fluent = dibi::select("*")->from("table"); -$dolly = clone $fluent; -$dolly->removeClause("select")->select("count(*)"); - -Assert::same( 'SELECT * FROM [table]', (string) $fluent ); -Assert::same( 'SELECT count(*) FROM [table]', (string) $dolly ); diff --git a/tests/dibi/DibiTranslator.DateTimeInterface.phpt b/tests/dibi/DibiTranslator.DateTimeInterface.phpt deleted file mode 100644 index 777ce62e..00000000 --- a/tests/dibi/DibiTranslator.DateTimeInterface.phpt +++ /dev/null @@ -1,23 +0,0 @@ - 'sqlite3', - 'database' => ':memory:', -)); -$translator = new DibiTranslator($connection); - -$datetime = new DateTime('1978-01-23 00:00:00'); - -Assert::equal($datetime->format('U'), $translator->formatValue(new DateTime($datetime->format('c')), NULL)); -Assert::equal($datetime->format('U'), $translator->formatValue(new DateTimeImmutable($datetime->format('c')), NULL)); diff --git a/tests/dibi/bootstrap.php b/tests/dibi/bootstrap.php deleted file mode 100644 index aa31bbbb..00000000 --- a/tests/dibi/bootstrap.php +++ /dev/null @@ -1,18 +0,0 @@ - array( - 'driver' => 'mysql', - 'host' => 'localhost', - 'username' => 'root', - 'password' => 'xxx', - 'charset' => 'utf8', - ), - - 'mysqli' => array( - 'driver' => 'mysqli', - 'host' => 'localhost', - 'username' => 'dibi', - 'password' => 'dibi', - 'charset' => 'utf8', - ), - - 'sqlite' => array( - 'driver' => 'sqlite', - 'database' => dirname(__FILE__) . '/data/sample.sdb', - ), - - 'sqlite3' => array( - 'driver' => 'sqlite3', - 'database' => dirname(__FILE__) . '/data/sample.sdb3', - ), - - 'odbc' => array( - 'driver' => 'odbc', - 'username' => 'dibi', - 'password' => 'dibi', - 'dsn' => 'Driver={Microsoft Access Driver (*.mdb)};Dbq=' . dirname(__FILE__) . '/data/sample.mdb', - ), - - 'postgresql' => array( - 'driver' => 'postgre', - 'host' => 'localhost', - 'port' => '5432', - 'username' => 'dibi', - 'password' => 'dibi', - 'persistent' => '1', - ), - - 'sqlite-pdo' => array( - 'driver' => 'pdo', - 'dsn' => 'sqlite2::' . dirname(__FILE__) . '/data/sample.sdb', - ), - - 'mysql-pdo' => array( - 'driver' => 'pdo', - 'dsn' => 'mysql:host=localhost', - 'username' => 'dibi', - 'password' => 'dibi', - ), - - 'mssql' => array( - 'driver' => 'mssql', - 'host' => 'localhost', - 'username' => 'dibi', - 'password' => 'dibi', - ), - - 'mssql2005' => array( - 'driver' => 'mssql2005', - 'host' => '(local)', - 'username' => 'dibi', - 'password' => 'dibi', - ), - - 'oracle' => array( - 'driver' => 'oracle', - 'username' => 'dibi', - 'password' => 'dibi', - ), -); diff --git a/tests/dibi/data/sample.mdb b/tests/dibi/data/sample.mdb deleted file mode 100644 index 464a336c..00000000 Binary files a/tests/dibi/data/sample.mdb and /dev/null differ diff --git a/tests/dibi/data/sample.mysql.sql b/tests/dibi/data/sample.mysql.sql deleted file mode 100644 index 5de3c41e..00000000 --- a/tests/dibi/data/sample.mysql.sql +++ /dev/null @@ -1,92 +0,0 @@ --- MySQL: 5.0.45 - -SET FOREIGN_KEY_CHECKS=0; - -SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; - --- -------------------------------------------------------- - -DROP TABLE IF EXISTS `customers`; -CREATE TABLE IF NOT EXISTS `customers` ( - `customer_id` int(11) NOT NULL auto_increment, - `name` varchar(100) default NULL, - PRIMARY KEY (`customer_id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=7 ; - - -INSERT INTO `customers` (`customer_id`, `name`) VALUES -(1, 'Dave Lister'), -(2, 'Arnold Rimmer'), -(3, 'The Cat'), -(4, 'Holly'), -(5, 'Kryten'), -(6, 'Kristine Kochanski'); - --- -------------------------------------------------------- - -DROP TABLE IF EXISTS `enumtest`; -CREATE TABLE IF NOT EXISTS `enumtest` ( - `id` int(11) NOT NULL auto_increment, - `test` enum('a','b','c') NOT NULL, - PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; - - --- -------------------------------------------------------- - -DROP TABLE IF EXISTS `orders`; -CREATE TABLE IF NOT EXISTS `orders` ( - `order_id` int(11) NOT NULL, - `customer_id` int(11) NOT NULL, - `product_id` int(11) NOT NULL, - `amount` float NOT NULL -) ENGINE=MyISAM DEFAULT CHARSET=utf8; - - -INSERT INTO `orders` (`order_id`, `customer_id`, `product_id`, `amount`) VALUES -(1, 2, 1, 7), -(2, 2, 3, 2), -(3, 1, 2, 3), -(4, 6, 3, 5); - --- -------------------------------------------------------- - -DROP TABLE IF EXISTS `products`; -CREATE TABLE IF NOT EXISTS `products` ( - `product_id` int(11) NOT NULL auto_increment, - `title` varchar(100) default NULL, - PRIMARY KEY (`product_id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; - - -INSERT INTO `products` (`product_id`, `title`) VALUES -(1, 'Chair'), -(2, 'Table'), -(3, 'Computer'); - --- -------------------------------------------------------- - -DROP TABLE IF EXISTS `settest`; -CREATE TABLE IF NOT EXISTS `settest` ( - `id` int(11) NOT NULL auto_increment, - `test` set('a','b','c') NOT NULL, - PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; - --- -------------------------------------------------------- - -DROP TABLE IF EXISTS `where`; -CREATE TABLE IF NOT EXISTS `where` ( - `select` int(11) NOT NULL, - `dot.dot` int(11) NOT NULL, - `is` int(11) NOT NULL, - `quot'n' space` int(11) NOT NULL -) ENGINE=MyISAM DEFAULT CHARSET=utf8; - - -INSERT INTO `where` (`select`, `dot.dot`, `is`, `quot'n' space`) VALUES -(1, 2, 3, 4); - -SET FOREIGN_KEY_CHECKS=1; - -SET SQL_MODE="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"; diff --git a/tests/dibi/data/sample.sdb b/tests/dibi/data/sample.sdb deleted file mode 100644 index e2069b73..00000000 Binary files a/tests/dibi/data/sample.sdb and /dev/null differ diff --git a/tests/dibi/data/sample.sdb3 b/tests/dibi/data/sample.sdb3 deleted file mode 100644 index 28b79df2..00000000 Binary files a/tests/dibi/data/sample.sdb3 and /dev/null differ diff --git a/tests/php-unix.ini b/tests/php-unix.ini deleted file mode 100644 index e3794e17..00000000 --- a/tests/php-unix.ini +++ /dev/null @@ -1,2 +0,0 @@ -[PHP] -;extension_dir = "./ext" diff --git a/tests/php-win.ini b/tests/php-win.ini deleted file mode 100644 index 0f8d7b63..00000000 --- a/tests/php-win.ini +++ /dev/null @@ -1,3 +0,0 @@ -[PHP] -extension_dir = "./ext" -extension=php_sqlite3.dll