$this->id, 'active' => true, 'version' => '1.2.3', 'problems' => $this->problems, 'release' => ['state' => 'released'], ]; } }; } public function testGivenComponentsComeFirstInTheOrderGivenFollowedByPodsAndTheEventsCalendar(): void { $probe = new EnvironmentProbe([$this->component('builder', ['Etwas fehlt']), $this->component('shop')]); $components = $probe->components(); self::assertSame(['builder', 'shop', 'pods', 'the-events-calendar'], array_column($components, 'id')); self::assertSame(['Etwas fehlt'], $components[0]['problems']); self::assertSame(['state' => 'released'], $components[1]['release']); } public function testWithoutComponentsOnlyPodsAndTheEventsCalendarAreReported(): void { $components = array_column((new EnvironmentProbe())->components(), null, 'id'); self::assertSame(['pods', 'the-events-calendar'], array_keys($components)); self::assertFalse($components['pods']['active'], 'no Pods in unit tests'); self::assertSame([], $components['pods']['problems']); self::assertNull($components['pods']['release']); self::assertNull($components['the-events-calendar']['version']); } }