* */ namespace Combodo\iTop\Test\UnitTest\ReleaseChecklist; use Combodo\iTop\Test\UnitTest\ItopTestCase; use iTopDesignFormat; use utils; /** * Class SetupCssIntegrityChecklistTest */ class SetupCssIntegrityChecklistTest extends ItopTestCase { public function testSetupCssIntegrity() { $sCssFileAbsPath = APPROOT."css/setup.css"; // First check if the compiled file exists $this->assertTrue(file_exists($sCssFileAbsPath)); // Then check that it is not empty $sVersionedCssFileContent = file_get_contents($sCssFileAbsPath); $this->assertGreaterThan(0, strlen($sVersionedCssFileContent), "Compiled setup.css file seems empty"); // Then check that the compiled file is up-to-date $sScssFileRelPath = "css/setup.scss"; $sScssFileAbsPath = APPROOT . $sScssFileRelPath; touch($sScssFileAbsPath); utils::GetCSSFromSASS($sScssFileRelPath); $sCompiledCssFileContent = file_get_contents($sCssFileAbsPath); $this->assertSame($sCompiledCssFileContent, $sVersionedCssFileContent, "Compiled setup.css file does not seem up to date as the one compiled just now is different"); } }