PhpSchool\LearnYouPhp\Exercise\ExceptionalCoding::getType PHP Method

getType() public method

public getType ( ) : PhpSchool\PhpWorkshop\Exercise\ExerciseType
return PhpSchool\PhpWorkshop\Exercise\ExerciseType
    public function getType()
    {
        return ExerciseType::CLI();
    }

Usage Example

 public function testArrWeGoExercise()
 {
     $e = new ExceptionalCoding($this->filesystem, $this->faker);
     $this->assertEquals('Exceptional Coding', $e->getName());
     $this->assertEquals('Introduction to Exceptions', $e->getDescription());
     $this->assertEquals(ExerciseType::CLI, $e->getType());
     $this->assertInstanceOf(SolutionInterface::class, $e->getSolution());
     $this->assertFileExists(realpath($e->getProblem()));
     $this->assertNull($e->tearDown());
 }