dataStorageMock = $this->createMock(Data::class); $this->objectManager = new ObjectManager($this); } public function testGetDeclaredFeatures() { $config = $this->objectManager->getObject( Config::class, ['dataStorage' => $this->dataStorageMock] ); $this->dataStorageMock->expects($this->once())->method('get')->with('mysql')->willReturn(['synonyms']); $this->assertEquals(['synonyms'], $config->getDeclaredFeatures('mysql')); } public function testIsFeatureSupported() { $config = $this->objectManager->getObject( Config::class, ['dataStorage' => $this->dataStorageMock] ); $this->dataStorageMock->expects($this->once())->method('get')->with('mysql')->willReturn(['synonyms']); $this->assertTrue($config->isFeatureSupported('synonyms', 'mysql')); } }