|
| 1 | +<?php |
| 2 | + |
| 3 | +declare(strict_types=1); |
| 4 | + |
| 5 | +/** |
| 6 | + * This file is part of CodeIgniter Shield. |
| 7 | + * |
| 8 | + * (c) CodeIgniter Foundation <admin@codeigniter.com> |
| 9 | + * |
| 10 | + * For the full copyright and license information, please view |
| 11 | + * the LICENSE file that was distributed with this source code. |
| 12 | + */ |
| 13 | + |
| 14 | +use Boundwize\Pyrameter\Config\PyrameterConfig; |
| 15 | +use Boundwize\Pyrameter\TestKind; |
| 16 | +use CodeIgniter\Test\DatabaseTestTrait; |
| 17 | +use CodeIgniter\Test\FeatureTestTrait; |
| 18 | +use Tests\Authentication\Filters\AbstractFilterTestCase; |
| 19 | +use Tests\Support\DatabaseTestCase; |
| 20 | + |
| 21 | +return PyrameterConfig::create() |
| 22 | + ->usesClass( |
| 23 | + DatabaseTestTrait::class, |
| 24 | + TestKind::Integration, |
| 25 | + unless: [FeatureTestTrait::class, AbstractFilterTestCase::class], |
| 26 | + ) |
| 27 | + ->usesClass( |
| 28 | + DatabaseTestCase::class, |
| 29 | + TestKind::Integration, |
| 30 | + unless: [FeatureTestTrait::class, AbstractFilterTestCase::class], |
| 31 | + ) |
| 32 | + ->usesClass( |
| 33 | + FeatureTestTrait::class, |
| 34 | + TestKind::Functional, |
| 35 | + ) |
| 36 | + ->usesClass( |
| 37 | + AbstractFilterTestCase::class, |
| 38 | + TestKind::Functional, |
| 39 | + ) |
| 40 | + ->usesFunction('copy', TestKind::Integration) |
| 41 | + ->usesFunction('file_get_contents', TestKind::Integration) |
| 42 | + ->usesFunction('getcwd', TestKind::Integration) |
| 43 | + ->usesFunction('is_file', TestKind::Integration) |
| 44 | + ->usesFunction('unlink', TestKind::Integration) |
| 45 | + ->targetShape( |
| 46 | + unit: ['min' => 40], |
| 47 | + functional: ['max' => 20], |
| 48 | + integration: ['max' => 50], |
| 49 | + e2e: ['max' => 0], |
| 50 | + ) |
| 51 | + ->failOnViolation(); |
0 commit comments