I have a file with a class and a function definition, according to the PSR-0 definitions (with autoloading):
namespace Foo;
function b() {};
class Bar {}
And I have the test for that class, place in the same namespace:
namespace Foo;
class BarTest {}
When I try to access the b()
function inside the test class, I get a undefined function
error:
namespace Foo;
class BarTest extends PHPUnit_Framework_TestCase
{
public function testSomething()
{
b();
Foo\b();
\b();
}
}
Nothing seems to work. How can I call that function?