mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
Fixing the path used to create fixtures.
This commit is contained in:
parent
f55fa4d026
commit
d0af5c78d5
2 changed files with 4 additions and 4 deletions
|
@ -57,7 +57,7 @@ class FixtureTask extends BakeTask {
|
||||||
*/
|
*/
|
||||||
public function __construct($stdout = null, $stderr = null, $stdin = null) {
|
public function __construct($stdout = null, $stderr = null, $stdin = null) {
|
||||||
parent::__construct($stdout, $stderr, $stdin);
|
parent::__construct($stdout, $stderr, $stdin);
|
||||||
$this->path = APP . 'tests' . DS . 'Fixture' . DS;
|
$this->path = APP . 'Test' . DS . 'Fixture' . DS;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -267,7 +267,7 @@ class FixtureTask extends BakeTask {
|
||||||
public function getPath() {
|
public function getPath() {
|
||||||
$path = $this->path;
|
$path = $this->path;
|
||||||
if (isset($this->plugin)) {
|
if (isset($this->plugin)) {
|
||||||
$path = $this->_pluginPath($this->plugin) . 'tests' . DS . 'Fixture' . DS;
|
$path = $this->_pluginPath($this->plugin) . 'Test' . DS . 'Fixture' . DS;
|
||||||
}
|
}
|
||||||
return $path;
|
return $path;
|
||||||
}
|
}
|
||||||
|
|
|
@ -83,7 +83,7 @@ class FixtureTaskTest extends CakeTestCase {
|
||||||
$in = $this->getMock('ConsoleInput', array(), array(), '', false);
|
$in = $this->getMock('ConsoleInput', array(), array(), '', false);
|
||||||
|
|
||||||
$Task = new FixtureTask($out, $out, $in);
|
$Task = new FixtureTask($out, $out, $in);
|
||||||
$this->assertEqual($Task->path, APP . 'tests' . DS . 'Fixture' . DS);
|
$this->assertEqual($Task->path, APP . 'Test' . DS . 'Fixture' . DS);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -362,7 +362,7 @@ class FixtureTaskTest extends CakeTestCase {
|
||||||
$this->Task->connection = 'test';
|
$this->Task->connection = 'test';
|
||||||
$this->Task->path = '/my/path/';
|
$this->Task->path = '/my/path/';
|
||||||
$this->Task->plugin = 'TestFixture';
|
$this->Task->plugin = 'TestFixture';
|
||||||
$filename = APP . 'Plugin' . DS . 'TestFixture' . DS . 'tests' . DS . 'Fixture' . DS . 'ArticleFixture.php';
|
$filename = APP . 'Plugin' . DS . 'TestFixture' . DS . 'Test' . DS . 'Fixture' . DS . 'ArticleFixture.php';
|
||||||
|
|
||||||
//fake plugin path
|
//fake plugin path
|
||||||
CakePlugin::load('TestFixture', array('path' => APP . 'Plugin' . DS . 'TestFixture' . DS));
|
CakePlugin::load('TestFixture', array('path' => APP . 'Plugin' . DS . 'TestFixture' . DS));
|
||||||
|
|
Loading…
Reference in a new issue