allows('get_template')->andReturn($template); $theme->allows('parent')->andReturn(false); $theme->allows('get')->with('Version')->andReturn($version); Functions\when('wp_get_theme')->justReturn($theme); } public function testDescribesDiviAsAReleasePerVersionPlugin(): void { $profile = DiviProfile::profile(); self::assertSame('divi', $profile->id); self::assertSame('Divi', $profile->label); self::assertSame(Tier::ReleasePerVersion, $profile->tier); self::assertSame(DiviFeature::cases(), $profile->capabilities); self::assertEquals(array_values(DiviAdapters::manifests()), $profile->manifests); } public function testTheMatrixIsTheReleaseGatesMatrix(): void { $status = ReleaseMatrices::status([DiviFeature::PageWrite], ReleaseState::Incompatible); ReleaseGate::useResolver(static fn () => $status); self::assertSame($status->matrix, (DiviProfile::profile()->matrix)()); } public function testTheVersionComesFromTheDiviTemplateAndThereIsNoActiveCheck(): void { $this->theme('Divi', '5.3.0'); $profile = DiviProfile::profile(); self::assertNull($profile->active, 'Divi has its own component; DiviIntegration decides availability'); self::assertSame('5.3.0', ($profile->version)()); $this->theme('twentytwentyfive'); self::assertNull(($profile->version)()); } }