Iam writing test cases for one component ,need to use fixtures in compoment.
my code is
Class SampleComponentTest extends TestCase
public $component = null;
public $controller = null;
public $fixtures = ['app.cities','plugin.sampleplugin.states'];
public function setUp()
$request = new Request();
$response = new Response();
$this->controller = $this->getMock(
$registry = new ComponentRegistry($this->controller);
$this->component = new SampleComponent($registry);
And i need to use two fixtures ,one is from app and another is from plugin.
when i run the code i got followign exception
"Exception: Referenced fixture class "SamplePlugin\Test\Fixture\StatesFixture" not found. Fixture "plugin.sampleplugin.states" was referenced in test case "App\Test\TestCase\Controller\Component\SampleComponentTest". in [D:\Projects\xampp\htdocs\testapp\vendor\
cakephp\cakephp\src\TestSuite\Fixture\FixtureManager.php, line 213]".
please provide the solutions to that how to use fixtures in component with sample code/
1)$this->component is mock object or direct object>
2)what is second parameter of getMock() method(if i provide empty it giving the error,above i replaced with empty)