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

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

Output a list of class types you can bake a test for.
public outputTypeChoices ( ) : void
Результат void
    public function outputTypeChoices()
    {
        $this->out('You must provide a class type to bake a test for. The valid types are:', 2);
        $i = 0;
        foreach ($this->classTypes as $option => $package) {
            $this->out(++$i . '. ' . $option);
        }
        $this->out('');
        $this->out('Re-run your command as `cake bake <type> <classname>`');
    }

Usage Example

Пример #1
0
 /**
  * Test outputTypeChoices method
  *
  * @return void
  */
 public function testOutputTypeChoices()
 {
     $this->io->expects($this->at(0))->method('out')->with($this->stringContains('You must provide'));
     $this->io->expects($this->at(1))->method('out')->with($this->stringContains('1. Entity'));
     $this->io->expects($this->at(2))->method('out')->with($this->stringContains('2. Table'));
     $this->io->expects($this->at(3))->method('out')->with($this->stringContains('3. Controller'));
     $this->Task->outputTypeChoices();
 }