Bake\Shell\Task\TestTask::mapType PHP Метод

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

Map the types that TestTask uses to concrete types that App::className can use.
public mapType ( string $type ) : string
$type string The type of thing having a test generated.
Результат string
    public function mapType($type)
    {
        $type = ucfirst($type);
        if (empty($this->classTypes[$type])) {
            throw new Exception('Invalid object type.');
        }
        return $this->classTypes[$type];
    }

Usage Example

Пример #1
0
 /**
  * Test that mapType returns the correct package names.
  *
  * @dataProvider mapTypeProvider
  * @return void
  */
 public function testMapType($original, $expected)
 {
     $this->assertEquals($expected, $this->Task->mapType($original));
 }