mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 02:56:15 +00:00
Fixing path constants in DbConfig and FixtureTask to be more consistent between web and cli.
This commit is contained in:
parent
6d54202c4c
commit
c9ca3c3785
3 changed files with 4 additions and 5 deletions
|
@ -66,7 +66,7 @@ class DbConfigTask extends Shell {
|
|||
* @var string
|
||||
*/
|
||||
public function initialize() {
|
||||
$this->path = APP_PATH . 'config' . DS;
|
||||
$this->path = APP . 'config' . DS;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -56,7 +56,7 @@ class FixtureTask extends BakeTask {
|
|||
*/
|
||||
public function __construct($stdout = null, $stderr = null, $stdin = null) {
|
||||
parent::__construct($stdout, $stderr, $stdin);
|
||||
$this->path = APP_PATH . 'tests' . DS . 'fixtures' . DS;
|
||||
$this->path = APP . 'tests' . DS . 'fixtures' . DS;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -90,7 +90,7 @@ class DbConfigTaskTest extends CakeTestCase {
|
|||
public function testGetConfig() {
|
||||
$this->Task->expects($this->at(0))->method('in')->will($this->returnValue('otherOne'));
|
||||
$result = $this->Task->getConfig();
|
||||
$this->assertEqual($result, 'otherOne');
|
||||
$this->assertEquals('otherOne', $result);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -101,8 +101,7 @@ class DbConfigTaskTest extends CakeTestCase {
|
|||
public function testInitialize() {
|
||||
$this->Task->initialize();
|
||||
$this->assertFalse(empty($this->Task->path));
|
||||
$this->assertEqual($this->Task->path, APP . 'config' . DS);
|
||||
|
||||
$this->assertEquals(APP . 'config' . DS, $this->Task->path);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue