I’m trying to write some unit tests. However no matter what I do I keep getting this error:
Error : Class “pathtoclassclassToTest” not found
The test I’m trying to run has a simple structure:
<?php
namespace testsunit;
use pathtoclassclassToTest;
use PHPUnitFrameworkTestCase;
class className extends TestCase
{
public function testname()
{
$classToTest = new classToTest;
$result = $classToTest->test();
$this->assertTrue($result);
}
}
The classToTest
looks like this:
<?php
namespace pathtoclass;
class classToTest
{
public function test()
{
return true;
}
}