Skip to content

Instantly share code, notes, and snippets.

@jubianchi
Last active December 17, 2015 20:49
Show Gist options
  • Save jubianchi/5670137 to your computer and use it in GitHub Desktop.
Save jubianchi/5670137 to your computer and use it in GitHub Desktop.
{
"name": "atoum-praspel",
"type": "script",
"description": "",
"authors": [
{
"name": "Julien Bianchi",
"email": "contact@jubianchi.fr",
"homepage": "http://jubianchi.fr"
}
],
"autoload": {
"psr-0": { "": "src/" }
},
"minimum-stability": "dev",
"require": {
"php": ">=5.3.3"
},
"require-dev": {
"hoathis/atoum": "dev-master"
},
"repositories": [
{
"type": "vcs",
"url": "/home/jubianchi/repositories/hoaproject/Hoathis-Atoum"
}
]
}
> PHP path: /usr/bin/php5
> PHP version:
=> PHP 5.4.9-4ubuntu2 (cli) (built: Mar 11 2013 16:09:26)
=> Copyright (c) 1997-2012 The PHP Group
=> Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies
> tests\units\SUT...
[00__________________________________________________________][2/2]
=> Test duration: 0.01 second.
=> Memory usage: 0.50 Mb.
> Total test duration: 0.01 second.
> Total test memory usage: 0.50 Mb.
> Running duration: 0.08 second.
Success (1 test, 0/2 methods, 2 void methods, 0 skipped method, 0 assertion) !
> There are 2 void methods:
=> tests\units\SUT::test M2 n°1()
=> tests\units\SUT::test m1 n°1()
<<?php
namespace {
class SUT {
public function M1() {}
public function M2() {}
}
}
namespace tests\units {
require_once __DIR__ . '/vendor/autoload.php';
require_once __DIR__ . '/vendor/hoa/core/Core.php';
require_once __DIR__ . '/vendor/atoum/atoum/scripts/runner.php';
from('Hoathis')
->import('Atoum.Test.Asserter.Praspel')
->import('Atoum.Test');
class SUT extends \Hoathis\Atoum\Test {
public function test m1 n°1 ( ) {
$self = new \SUT();
$this->requires['x']->in = realdom()->boundinteger(0, 256);
$this->requires['y']->in = realdom()->const('foo');
$this->ensures['\result']->in = realdom()->boolean();
$this->praspel->verdict();
return;
}
public function test M2 n°1 ( ) {
$self = new \SUT();
$this->requires['x']->in = realdom()->const('foo');
$this->ensures['\result']->in = realdom()->const('bar');
$this->praspel->verdict();
return;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment