@Test public void parse_error() throws Exception { File baseDir = new File("src/test/resources/phpini-error"); SensorContextTester context = SensorContextTester.create(baseDir); setupSingleFile(baseDir, context); sensor().execute(context, checks()); assertThat(logTester.logs()).contains("Unable to parse file: php.ini"); }
@Override public void execute(SensorContext context) { Checks<PhpIniCheck> checks = checkFactory .<PhpIniCheck>create(CheckList.REPOSITORY_KEY) .addAnnotatedChecks(CheckList.getPhpIniChecks()); execute(context, checks); }
PhpIniSensor implements Sensor { @Override public void execute(SensorContext context) { Checks<PhpIniCheck> checks = checkFactory .<PhpIniCheck>create(CheckList.REPOSITORY_KEY) .addAnnotatedChecks(CheckList.getPhpIniChecks()); execute(context, checks); } }
PhpIniSensor implements Sensor { @Override public void execute(SensorContext context) { Checks<PhpIniCheck> checks = checkFactory .<PhpIniCheck>create(CheckList.REPOSITORY_KEY) .addAnnotatedChecks(CheckList.getPhpIniChecks()); execute(context, checks); } PhpIniSensor(CheckFactory checkFactory); }
PhpIniSensor implements Sensor { @Override public void execute(SensorContext context) { Checks<PhpIniCheck> checks = checkFactory .<PhpIniCheck>create(CheckList.REPOSITORY_KEY) .addAnnotatedChecks(CheckList.getPhpIniChecks()); execute(context, checks); } PhpIniSensor(CheckFactory checkFactory); @Override void describe(SensorDescriptor descriptor); @Override void execute(SensorContext context); }
PhpIniSensor implements Sensor { @Override public void execute(SensorContext context) { Checks<PhpIniCheck> checks = checkFactory .<PhpIniCheck>create(CheckList.REPOSITORY_KEY) .addAnnotatedChecks(CheckList.getPhpIniChecks()); execute(context, checks); } PhpIniSensor(CheckFactory checkFactory); @Override void describe(SensorDescriptor descriptor); @Override void execute(SensorContext context);  }