Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 7 additions & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
language: objective-c
language: php

php:
- 5.4
- 5.5

matrix:
allow_failures:
- php: 5.5
before_install:
- wget https://scrutinizer-ci.com/ocular.phar

script:
- sudo ant -Dos.family=mac create-pkg
- sudo chown $USER /opt
- ant composer-init
- ant -Dprepare.distribution.build=false build
- php ocular.phar code-coverage:upload --format=php-clover $TRAVIS_BUILD_DIR/target/reports/unit/clover.xml

notifications:
email: tw@techdivision.com
Expand Down
17 changes: 8 additions & 9 deletions build.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<!DOCTYPE project>
<project name="appserver-io-php/runtime" default="deploy" basedir=".">
<project name="appserver-io-php/runtime" default="build" basedir=".">

<!-- ==================================================================== -->
<!-- Load the environment variables into our properties -->
Expand Down Expand Up @@ -30,6 +30,11 @@
<property name="vendor.dir" value ="${basedir}/${codepool}" />
<property name="build.dir" value="${vendor.dir}/appserver-io/build" />

<!-- ==================================================================== -->
<!-- Import the common build configuration file -->
<!-- ==================================================================== -->
<import file="${build.dir}/common.xml" optional="true"/>

<!-- ==================================================================== -->
<!-- Create some basic properties which we need for further processing -->
<!-- The property hub.scp-user is missing on purpose and has to be -->
Expand All @@ -48,12 +53,6 @@
<property name="package.name" value="appserver-${appserver.version}-${appserver.version.suffix}${build.number}.${os.qualified.name}.${os.architecture}.${os.package-extension}"/>
<property name="package.specific-dir" value="${php-target.dir}/"/>


<!-- ==================================================================== -->
<!-- Import the common build configuration file -->
<!-- ==================================================================== -->
<import file="${build.dir}/common.xml" optional="true"/>

<!-- ==================================================================== -->
<!-- Checks if composer has installed it's dependencies -->
<!-- ==================================================================== -->
Expand Down Expand Up @@ -439,7 +438,7 @@
<!-- Get PECL appserver source package by given version number -->
<!-- ==================================================================== -->
<target name="get-ext-appserver-src" depends="check-ext-appserver-src-present" unless="ext-appserver-src.present" description="Get php ext appserver source package by given version number">
<get src="https://github.com/techdivision/php-ext-appserver/releases/download/v${appserver.ext-appserver.version}-beta/appserver-${appserver.ext-appserver.version}.tgz" dest="${lib.dir}/ext-appserver-${appserver.ext-appserver.version}.tgz" usetimestamp="true"/>
<get src="https://github.com/appserver-io-php/php-ext-appserver/releases/download/v${appserver.ext-appserver.version}-beta/appserver-${appserver.ext-appserver.version}.tgz" dest="${lib.dir}/ext-appserver-${appserver.ext-appserver.version}.tgz" usetimestamp="true"/>
</target>

<!-- ==================================================================== -->
Expand Down Expand Up @@ -1855,7 +1854,7 @@
<arg line="clone https://github.com/techdivision/TechDivision_LemCacheContainer.git"/>
</exec>
<exec executable="${git.bin}" dir="${github.backup.dir}/backup-${date}">
<arg line="clone https://github.com/techdivision/php-ext-appserver.git"/>
<arg line="clone https://github.com/appserver-io-php/php-ext-appserver.git"/>
</exec>
<exec executable="${git.bin}" dir="${github.backup.dir}/backup-${date}">
<arg line="clone https://github.com/techdivision/TechDivision_ApplicationServerApi.git"/>
Expand Down
23 changes: 19 additions & 4 deletions tests/AppserverIo/Php/Runtime/RuntimeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
namespace AppserverIo\Php\Runtime;

/**
* Dummy test implementation.
* Runtime test implementations.
*
* @category Appserver
* @package Psr
Expand All @@ -39,12 +39,27 @@ class RuntimeTest extends \PHPUnit_Framework_TestCase
{

/**
* A dummy test implementation.
* Tests if pthreads is available.
*
* @return void
*/
public function testDummy()
public function testPthreadsAvailable()
{
$this->assertTrue(true);
$this->assertTrue(extension_loaded('pthreads'));
}

/**
* Tests if the threaded classes are available.
*
* @return void
*/
public function testThreadClassAvailable()
{
$this->assertTrue(class_exists('\Pool'));
$this->assertTrue(class_exists('\Cond'));
$this->assertTrue(class_exists('\Mutex'));
$this->assertTrue(class_exists('\Thread'));
$this->assertTrue(class_exists('\Worker'));
$this->assertTrue(class_exists('\Stackable'));
}
}