Permalink
Browse files

extend integration with external tools

transform to Composer package
modify testsuite
  • Loading branch information...
1 parent dc87001 commit c2a98b131bb23096ead117c5ed6573db09a84bd5 Nuzhdin Urii aka tz-lom committed Jan 11, 2013
View
@@ -0,0 +1,4 @@
+/tests export-ignore
+/travis export-ignore
+phpunit.xml.dist export-ignore
+.travis.yml export-ignore
View
@@ -0,0 +1,3 @@
+.idea
+composer.phar
+vendor
View
@@ -10,6 +10,7 @@ before_script:
- ./travis/install_hs.sh
- mysql -e "show processlist;"
- mysql -e 'create database IF NOT EXISTS HSPHP_test;'
- - mysql -D HSPHP_test < tests/import.sql
+ - mysql -D HSPHP_test < tests/HSPHP/import.sql
+ - composer install
-script: cd tests && phpunit .
+script: phpunit
View
@@ -0,0 +1,7 @@
+Copyright (c) 2010 tz-lom
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
View
@@ -1,3 +1,3 @@
-Master: [![Build Status](https://api.travis-ci.org/KonstantinKuklin/HSPHP.png?branch=master)](http://travis-ci.org/KonstantinKuklin/HSPHP)
+Master: [![Build Status](https://api.travis-ci.org/tz-lom/HSPHP.png?branch=master)](http://travis-ci.org/tz-lom/HSPHP)
ToDo: Write README
View
@@ -0,0 +1,22 @@
+{
+ "name": "tz-lom/hsphp",
+ "description": "Client library for MySQL Handler socket extension.",
+ "license": "MIT",
+ "authors": [
+ {
+ "name": "Nuzhdin Urii",
+ "email": "nuzhdin.urii@gmail.com"
+ }
+ ],
+ "keywords": [
+ "mysql","handler socket"
+ ],
+ "support": {
+ "source": "http://github.com/tz-lom/HSPHP"
+ },
+ "autoload": {
+ "psr-0": {
+ "HandlerSocket": "src/"
+ }
+ }
+}
View
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<phpunit backupGlobals="false"
+ backupStaticAttributes="false"
+ colors="true"
+ convertErrorsToExceptions="true"
+ convertNoticesToExceptions="true"
+ convertWarningsToExceptions="true"
+ processIsolation="false"
+ stopOnFailure="false"
+ syntaxCheck="false"
+ bootstrap="tests/bootstrap.php"
+ >
+ <testsuites>
+ <testsuite name="HSPHP">
+ <directory>tests/HSPHP</directory>
+ </testsuite>
+ </testsuites>
+
+</phpunit>
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
View
@@ -1 +0,0 @@
-my.cfg
@@ -0,0 +1 @@
+my.cfg
@@ -1,23 +1,13 @@
<?php
-require_once('../library/IOException.php');
-require_once('../library/ErrorMessage.php');
-require_once('../library/ReadCommands.php');
-require_once('../library/WriteCommands.php');
-require_once('../library/ReadSocket.php');
-require_once('../library/ReadHandler.php');
-require_once('../library/WriteSocket.php');
-require_once('../library/WriteHandler.php');
-require_once('../library/Pipeline.php');
-
class HSPipelineTest extends \HandlerSocket\WriteHandler
{
function __construct($io)
{
$db = 'HSPHP_test';
- if(file_exists('./my.cfg'))
+ if(file_exists(__DIR__.'/my.cfg'))
{
- $db = trim(file_get_contents('./my.cfg'));
+ $db = trim(file_get_contents(__DIR__.'/my.cfg'));
}
parent::__construct($io,$db,'write1',array('k'),'',array('k','v'));
}
@@ -1,19 +1,13 @@
<?php
-require_once('../library/IOException.php');
-require_once('../library/ErrorMessage.php');
-require_once('../library/ReadCommands.php');
-require_once('../library/ReadSocket.php');
-require_once('../library/ReadHandler.php');
-
class HSReadTest extends \HandlerSocket\ReadHandler
{
function __construct($io)
{
$db = 'HSPHP_test';
- if(file_exists('./my.cfg'))
+ if(file_exists(__DIR__.'/my.cfg'))
{
- $db = trim(file_get_contents('./my.cfg'));
+ $db = trim(file_get_contents(__DIR__.'/my.cfg'));
}
parent::__construct($io,$db,'read1',array('key'),'',array('key','date','float','varchar','text','set','union','null'));
}
@@ -1,19 +1,14 @@
<?php
-require_once('../library/IOException.php');
-require_once('../library/ErrorMessage.php');
-require_once('../library/ReadCommands.php');
-require_once('../library/ReadSocket.php');
-
class ReadSocketTest extends PHPUnit_Framework_TestCase
{
protected $db = 'HSPHP_test';
function __construct()
{
- if(file_exists('./my.cfg'))
+ if(file_exists(__DIR__.'/my.cfg'))
{
- $this->db = trim(file_get_contents('./my.cfg'));
+ $this->db = trim(file_get_contents(__DIR__.'/my.cfg'));
}
}
@@ -1,22 +1,13 @@
<?php
-require_once('../library/IOException.php');
-require_once('../library/ErrorMessage.php');
-require_once('../library/ReadCommands.php');
-require_once('../library/WriteCommands.php');
-require_once('../library/ReadSocket.php');
-require_once('../library/ReadHandler.php');
-require_once('../library/WriteSocket.php');
-require_once('../library/WriteHandler.php');
-
class HSWriteTest extends \HandlerSocket\WriteHandler
{
function __construct($io)
{
$db = 'HSPHP_test';
- if(file_exists('./my.cfg'))
+ if(file_exists(__DIR__.'/my.cfg'))
{
- $db = trim(file_get_contents('./my.cfg'));
+ $db = trim(file_get_contents(__DIR__.'/my.cfg'));
}
parent::__construct($io,$db,'write1',array('k'),'',array('k','v'));
}
@@ -38,7 +29,7 @@ function testInsert()
}
/**
- * @d epends testInsert
+ * @depends testInsert
*/
function testUpdate()
{
@@ -1,21 +1,14 @@
<?php
-require_once('../library/IOException.php');
-require_once('../library/ErrorMessage.php');
-require_once('../library/ReadCommands.php');
-require_once('../library/WriteCommands.php');
-require_once('../library/ReadSocket.php');
-require_once('../library/WriteSocket.php');
-
class WriteSocketTest extends PHPUnit_Framework_TestCase
{
protected $db = 'HSPHP_test';
function __construct()
{
- if(file_exists('./my.cfg'))
+ if(file_exists(__DIR__.'/my.cfg'))
{
- $this->db = trim(file_get_contents('./my.cfg'));
+ $this->db = trim(file_get_contents(__DIR__.'/my.cfg'));
}
}
function testInsert()
File renamed without changes.
File renamed without changes.
View
@@ -0,0 +1,3 @@
+<?php
+
+$autoload = require __DIR__.'/../vendor/autoload.php';

0 comments on commit c2a98b1

Please sign in to comment.