A testing framework/harness that supports Spec and XUnit style tests

Installs: 7

Dependents: 0

Stars: 5

Watchers: 1

Forks: 0

Open Issues: 0

0.4 2014-07-30 00:32 UTC


Build Status

Demeanor is a multi-paradigm test harness for PHP 5.4+ that allows you to write Spec, XUnit-style, and PHPT tests.

See the documentation for a getting started guide.

Spec Test Example

// SomeFeature.spec.php

use Counterpart\Assert;
use Demeanor\TestContext;

$this->it('should throw an exception', function (TestContext $ctx) {
    throw new \Exception();

$this->describe('#ASubFeature', function () {
    $this->it('should always be true', function () {

XUnit-Style Test Example

// SomeTest.php

use Counterpart\Assert;

class SomeTest
    public function testSomething()

PHPT Test Example

This is a test description
if (version_compare('5.4', phpversion(), '<')) {
    echo 'skip: this test requires PHP 5.4+';
echo 'this is the test code', PHP_ECOL
echo 'here ', time(), PHP_EOL;
this is the test code
here %d

License (Apache)

Copyright 2014 Christopher Davis

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

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.