mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-03-18 07:29:51 +00:00
Added tests for bake shell cache prefix generation
This commit is contained in:
parent
8e818c89b6
commit
0441c9f6c3
1 changed files with 18 additions and 0 deletions
|
@ -249,6 +249,24 @@ class ProjectTaskTest extends CakeTestCase {
|
||||||
$this->assertNotRegExp('/76859309657453542496749683645/', $contents, 'Default CipherSeed left behind. %s');
|
$this->assertNotRegExp('/76859309657453542496749683645/', $contents, 'Default CipherSeed left behind. %s');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* test generation of cache prefix
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function testCachePrefixGeneration() {
|
||||||
|
$this->_setupTestProject();
|
||||||
|
|
||||||
|
$path = $this->Task->path . 'bake_test_app' . DS;
|
||||||
|
$result = $this->Task->cachePrefix($path);
|
||||||
|
$this->assertTrue($result);
|
||||||
|
|
||||||
|
$File = new File($path . 'Config' . DS . 'core.php');
|
||||||
|
$contents = $File->read();
|
||||||
|
$this->assertRegExp('/\$prefix = \'.+\';/', $contents, '$prefix is not defined');
|
||||||
|
$this->assertNotRegExp('/\$prefix = \'myapp_\';/', $contents, 'Default cache prefix left behind. %s');
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test that index.php is generated correctly.
|
* Test that index.php is generated correctly.
|
||||||
*
|
*
|
||||||
|
|
Loading…
Add table
Reference in a new issue