| 1 | <?php |
||
| 2 | |||
| 3 | /** |
||
| 4 | * @author : Jagepard <[email protected]> |
||
| 5 | * @license https://mit-license.org/ MIT |
||
| 6 | */ |
||
| 7 | |||
| 8 | namespace Creational\Builder\Tests; |
||
| 9 | |||
| 10 | use Creational\Builder\{Order, |
||
| 11 | Director, |
||
| 12 | PCBuilder, |
||
| 13 | Hardware\Cpu, |
||
| 14 | Hardware\Gpu, |
||
| 15 | Hardware\Ram, |
||
| 16 | Hardware\Ssd, |
||
| 17 | Hardware\Hdd, |
||
| 18 | Hardware\Motherboard, |
||
| 19 | Interfaces\ComputerInterface |
||
| 20 | }; |
||
| 21 | use PHPUnit\Framework\TestCase as PHPUnit_Framework_TestCase; |
||
|
0 ignored issues
–
show
|
|||
| 22 | |||
| 23 | class BuilderTest extends PHPUnit_Framework_TestCase |
||
| 24 | { |
||
| 25 | private ComputerInterface $desktop; |
||
| 26 | |||
| 27 | protected function setUp(): void |
||
| 28 | { |
||
| 29 | $employe = new Director(); |
||
| 30 | $this->desktop = $employe->build(new PCBuilder()); |
||
| 31 | } |
||
| 32 | |||
| 33 | public function testInstance() |
||
| 34 | { |
||
| 35 | $this->assertInstanceOf(ComputerInterface::class, $this->desktop); |
||
| 36 | } |
||
| 37 | |||
| 38 | public function testParts() |
||
| 39 | { |
||
| 40 | $this->assertEquals(Order::MB, $this->desktop->getComponent(Motherboard::class)->getValue()); |
||
| 41 | $this->assertEquals(Order::CPU, $this->desktop->getComponent(Cpu::class)->getValue()); |
||
| 42 | $this->assertEquals(Order::RAM, $this->desktop->getComponent(Ram::class)->getValue()); |
||
| 43 | $this->assertEquals(Order::GPU, $this->desktop->getComponent(Gpu::class)->getValue()); |
||
| 44 | $this->assertEquals(Order::SSD, $this->desktop->getComponent(Ssd::class)->getValue()); |
||
| 45 | $this->assertEquals(Order::HDD, $this->desktop->getComponent(Hdd::class)->getValue()); |
||
| 46 | } |
||
| 47 | } |
||
| 48 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths