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