Skip to content

Instantly share code, notes, and snippets.

@jubianchi
Last active December 21, 2015 21:48
Show Gist options
  • Select an option

  • Save jubianchi/6370371 to your computer and use it in GitHub Desktop.

Select an option

Save jubianchi/6370371 to your computer and use it in GitHub Desktop.
<?php
namespace {
class A {
private $sep;
public function __construct($sep = null) {
$this->sep = $sep ?: '--';
}
public function concat($a, $b) {
return $a . $this->sep . $b;
}
}
}
namespace tests\units {
use atoum;
class A extends atoum {
public function testConcat() {
$this
->if($object = new \mock\A())
->then
->string($object->concat('foo', 'bar'))->isEqualTo('foo--bar')
;
}
}
}
@jubianchi
Copy link
Author

vendor/bin/atoum -f test.php

> PHP path: /usr/bin/php
> PHP version:
=> PHP 5.4.17 (cli) (built: Aug 18 2013 02:00:51)
=> Copyright (c) 1997-2013 The PHP Group
=> Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies
> tests\units\A...
[S___________________________________________________________][1/1]
=> Test duration: 0.00 second.
=> Memory usage: 0.25 Mb.
> Total test duration: 0.00 second.
> Total test memory usage: 0.25 Mb.
> Running duration: unknown.
Success (1 test, 1/1 method, 0 void method, 0 skipped method, 2 assertions)!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment