assertInstanceOf(Config::class, $config); } public function testConfigGet(): void { $projectDir = dirname(dirname(dirname(__DIR__))); $cache = new TraceableAdapter(new FilesystemAdapter()); $config = new Config('', new Stopwatch(), $projectDir, $cache); $this->assertSame('Bolt Core Git Clone', $config->get('general/sitename')); } public function testConfigHas(): void { $projectDir = dirname(dirname(dirname(__DIR__))); $cache = new TraceableAdapter(new FilesystemAdapter()); $config = new Config('', new Stopwatch(), $projectDir, $cache); $this->assertTrue($config->has('general/payoff')); $this->assertFalse($config->has('general/payoffXXXXX')); } public function testConfigGetMediaTypes(): void { $projectDir = dirname(dirname(dirname(__DIR__))); $cache = new TraceableAdapter(new FilesystemAdapter()); $config = new Config('', new Stopwatch(), $projectDir, $cache); /** @var Collection $mediaTypes */ $mediaTypes = $config->getMediaTypes(); $this->assertCount(8, $mediaTypes); $this->assertTrue($mediaTypes->contains('png')); $this->assertFalse($mediaTypes->contains('docx')); } }