public function testReturnsSetupPath() { $editionPathSelector = $this->getEditionPathSelectorMock(); $editionPathSelector = new EditionPathProvider($editionPathSelector); $this->assertSame('/Setup/', $editionPathSelector->getSetupDirectory()); }
/** * Test if sql files don't have invalid encoding. */ public function testSqlFilesForInvalidEncoding() { $pathProvider = new EditionPathProvider(new EditionRootPathProvider(new EditionSelector())); $filePathPattern = $pathProvider->getSetupDirectory() . '/Sql/*.sql'; foreach (glob($filePathPattern) as $sFilePath) { if (is_readable($sFilePath)) { $sFileContent = file_get_contents($sFilePath); foreach (array(0xef, 0xbb, 0xbf, 0x9c) as $sCharacter) { $this->assertFalse(strpos($sFileContent, $sCharacter), "Character with invalid encoding found in {$sFilePath} file."); } } } }