kylekatarnls / multi-tester

Compare 40c7576 ... +1 ... 268d377

No flags found

Use flags to group coverage reports by test type, project and/or folders.
Then setup custom commit statuses and notifications for each flag.

e.g., #unittest #integration

#production #enterprise

#frontend #backend

Learn more about Codecov Flags here.

Showing 1 of 3 files from the diff.

@@ -257,20 +257,43 @@
Loading
257 257
        $this->asArray($settings[$key]);
258 258
    }
259 259
260 +
    /**
261 +
     * @param array $settings
262 +
     */
263 +
    protected function seedAutoloadSetting(&$settings)
264 +
    {
265 +
        $this->seedSetting(
266 +
            $settings,
267 +
            'autoload',
268 +
            'autoload build script',
269 +
            'composer dump-autoload --no-interaction' . ($this->config->quiet ? ' --quiet' : '')
270 +
        );
271 +
    }
272 +
260 273
    /**
261 274
     * @param array $settings
262 275
     */
263 276
    protected function seedInstallSetting(&$settings)
264 277
    {
265 -
        $this->seedSetting($settings, 'install', 'install script', 'composer install --no-interaction' . ($this->config->quiet ? ' --quiet' : ''));
278 +
        $this->seedSetting(
279 +
            $settings,
280 +
            'install',
281 +
            'install script',
282 +
            'composer install --no-interaction' . ($this->config->quiet ? ' --quiet' : '')
283 +
        );
266 284
    }
267 285
268 286
    /**
269 287
     * @param array $settings
270 288
     */
271 289
    protected function seedScriptSetting(&$settings)
272 290
    {
273 -
        $this->seedSetting($settings, 'script', 'script', 'vendor/bin/phpunit --no-coverage');
291 +
        $this->seedSetting(
292 +
            $settings,
293 +
            'script',
294 +
            'script',
295 +
            'vendor/bin/phpunit --no-coverage'
296 +
        );
274 297
    }
275 298
276 299
    /**
@@ -325,7 +348,24 @@
Loading
325 348
    }
326 349
327 350
    /**
328 -
     * @throws TestFailedException
351 +
     * @throws MultiTesterException
352 +
     */
353 +
    protected function autoload()
354 +
    {
355 +
        $settings = $this->getSettings();
356 +
        $package = $this->getPackage();
357 +
        $config = $this->getConfig();
358 +
        $tester = $config->getTester();
359 +
360 +
        $this->seedAutoloadSetting($settings);
361 +
362 +
        if (!$tester->exec($settings['autoload'], $config->quiet)) {
363 +
            throw new MultiTesterException("Building autoloader of $package failed.");
364 +
        }
365 +
    }
366 +
367 +
    /**
368 +
     * @throws MultiTesterException|TestFailedException
329 369
     *
330 370
     * @return bool
331 371
     */
@@ -340,6 +380,8 @@
Loading
340 380
341 381
        (new Directory($config->projectDirectory))->copy('vendor/' . $config->packageName, ['.git', 'vendor']);
342 382
383 +
        $this->autoload();
384 +
343 385
        $this->seedScriptSetting($settings);
344 386
345 387
        $tester->framedInfo("Testing $package");

Everything is accounted for!

No changes detected that need to be reviewed.
What changes does Codecov check for?
Lines, not adjusted in diff, that have changed coverage data.
Files that introduced coverage data that had none before.
Files that have missing coverage data that once were tracked.
Files Complexity Coverage
src/MultiTester ø 100.00%
Project Totals (12 files) 197 100.00%
Loading