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

configure() public method

public configure ( PhpSchool\PhpWorkshop\ExerciseDispatcher $dispatcher )
$dispatcher PhpSchool\PhpWorkshop\ExerciseDispatcher
    public function configure(ExerciseDispatcher $dispatcher)
    {
        $dispatcher->requireCheck(FunctionRequirementsCheck::class);
    }

Usage Example

 public function testConfigure()
 {
     $dispatcher = $this->getMockBuilder(ExerciseDispatcher::class)->disableOriginalConstructor()->getMock();
     $dispatcher->expects($this->once())->method('requireCheck')->with(FunctionRequirementsCheck::class);
     $e = new ExceptionalCoding($this->filesystem, $this->faker);
     $e->configure($dispatcher);
 }