testCaseFileName() публичный Метод

Make the filename for the test case. resolve the suffixes for controllers and get the plugin path if needed.
public testCaseFileName ( string $type, string $className ) : string
$type string The Type of object you are generating tests for eg. controller
$className string The fully qualified classname of the class the test is being generated for.
Результат string filename the test should be created on.
Пример #1
0
 /**
  * Test filename generation for plugins.
  *
  * @return void
  */
 public function testTestCaseFileNamePlugin()
 {
     $this->Task->path = DS . 'my/path/tests/';
     Plugin::load('TestTest', ['path' => APP . 'Plugin' . DS . 'TestTest' . DS]);
     $this->Task->plugin = 'TestTest';
     $class = 'TestBake\\Model\\Entity\\Post';
     $result = $this->Task->testCaseFileName('entity', $class);
     $expected = APP . 'Plugin/TestTest/tests/TestCase/Model/Entity/PostTest.php';
     $this->assertPathEquals($expected, $result);
 }