2 usingPackage ('coreexceptions');
4 class fooFunctionsTest
extends UnitTestCase
{
8 public function setUp () {
9 $this->state
= get_include_path();
10 set_include_path ('.');
13 public function tearDown() {
14 set_include_path($this->state
);
17 public function test_usingPackageReturnPath () {
18 usingPackage ('models');
20 $this->assertEqual(get_include_path(), '.' . PATH_SEPARATOR
. LIB_PATH
.'/models');
23 public function test_usingPackageBadPackage () {
25 $sPackageName = '...';
27 usingPackage ($sPackageName);
28 } catch (Exception
$e) {
29 $this->assertIsA($e, 'tsExceptionPackageImport', 'The usingpackage function didn\' throw the correct exception.');