[TYPO3-core] RFC #13998: Introduce Automatic versioning of CSS and JS files

Ernesto Baschny [cron IT] ernst at cron-it.de
Wed Apr 14 09:48:06 CEST 2010


Oliver Klee schrieb am 13.04.2010 23:21:

> Ernesto Baschny [cron IT] schrieb:
>> Done, commited in rev. 7352. All green again, sorry.
> 
> When I run the tests, they're still yellow. The ? in the regexp also
> needs to be escaped.
> 
> I've attached a patch that fixes this.

You are right. My setup was already setup to versionNumberInFilename=TRUE.

This leads me to a question on the test-scenario. When certain methods
that we are testing behave differently depending on TYPO3_CONF_VARS
settings, they should test all different combinations of such, right?
And not only test the "current developers environment". What do you
think of this:

	$expectedRegExp = '#<script
src="contrib/prototype/prototype\.(js|\d+\.js|js\?\d+)"
type="text/javascript"></script>#';

	foreach (array(TRUE, FALSE) as
$GLOBALS['TYPO3_CONF_VARS']['BE']['versionNumberInFilename']) {
		$this->fixture->loadPrototype();
		$out = $this->fixture->render();
		$this->assertRegExp(
			$expectedRegExp,
			$out
		);
	}


Cheers,
Ernesto


More information about the TYPO3-team-core mailing list