Skip to content

Instantly share code, notes, and snippets.

@loicm
Created April 11, 2013 08:46
Show Gist options
  • Save loicm/5361800 to your computer and use it in GitHub Desktop.
Save loicm/5361800 to your computer and use it in GitHub Desktop.
// la classe de test dans app/tests/php/modules/moduleA/foo.php
namespace vendor\project\tests\units;
require_once __DIR__.'/../../mageekguy.atoum.phar';
include_once __DIR__.'/../../../../modules/moduleA/classes/foo/foo.class.php';
use mageekguy\atoum;
use vendor\project\foo;
class foo extends atoum\test {
public function testClass() {
$foo = new foofoo();
$this->object($foo);
}
}
// Ma classe métier dans app/modules/moduleA/classes/foo/foo.class.php
<?php
namespace vendor\project\foo;
class foo { }
> There is 1 exception:
=> vendor\project\tests\units\foo::testClass():
==> Exception throwed in file on line 0:
==> exception 'mageekguy\atoum\exceptions\runtime' with message 'Tested class 'vendor\project\foo' does not exist for test class 'vendor\project\tests\units\foo'' in phar:///home/loic/path/to/mageekguy.atoum.phar/1/classes/test.php:822
==> Stack trace:
==> #0 -(1): mageekguyatoumtest->runTestMethod('testClass')
==> #1 {main}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment