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

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

Is a mock class required for this type of test? Controllers require a mock class.
public hasMockClass ( string $type ) : boolean
$type string The type of object tests are being generated for eg. controller.
Результат boolean
    public function hasMockClass($type)
    {
        $type = strtolower($type);
        return $type === 'controller';
    }

Usage Example

Пример #1
0
 /**
  * Test that mock class generation works for the appropriate classes
  *
  * @return void
  */
 public function testMockClassGeneration()
 {
     $result = $this->Task->hasMockClass('controller');
     $this->assertTrue($result);
 }