Skip to content

Commit

Permalink
Remove an unused method.
Browse files Browse the repository at this point in the history
This method never gets called, so it can be removed.
  • Loading branch information
markstory committed Apr 25, 2014
1 parent 729506e commit f441a1d
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 32 deletions.
17 changes: 0 additions & 17 deletions src/Console/Command/Task/TestTask.php
Expand Up @@ -375,23 +375,6 @@ protected function _addFixture($name) {
$this->_fixtures[$name] = $fixture;
}

/**
* Interact with the user to get additional fixtures they want to use.
*
* @return array Array of fixtures the user wants to add.
*/
public function getUserFixtures() {
$proceed = $this->in(__d('cake_console', 'Bake could not detect fixtures, would you like to add some?'), ['y', 'n'], 'n');
$fixtures = [];
if (strtolower($proceed) === 'y') {
$fixtureList = $this->in(__d('cake_console', "Please provide a comma separated list of the fixtures names you'd like to use.\nExample: 'app.comment, app.post, plugin.forums.post'"));
$fixtureListTrimmed = str_replace(' ', '', $fixtureList);
$fixtures = explode(',', $fixtureListTrimmed);
}
$this->_fixtures = array_merge($this->_fixtures, $fixtures);
return $fixtures;
}

/**
* Is a mock class required for this type of test?
* Controllers require a mock class.
Expand Down
15 changes: 0 additions & 15 deletions tests/TestCase/Console/Command/Task/TestTaskTest.php
Expand Up @@ -239,21 +239,6 @@ public function testRegistryClearWhenBuildingTestObjects() {
$this->assertFalse(TableRegistry::exists('Articles'));
}

/**
* Test the user interaction for defining additional fixtures.
*
* @return void
*/
public function testGetUserFixtures() {
$this->Task->expects($this->at(0))->method('in')->will($this->returnValue('y'));
$this->Task->expects($this->at(1))->method('in')
->will($this->returnValue('app.pizza, app.topping, app.side_dish'));

$result = $this->Task->getUserFixtures();
$expected = array('app.pizza', 'app.topping', 'app.side_dish');
$this->assertEquals($expected, $result);
}

/**
* Dataprovider for class name generation.
*
Expand Down

0 comments on commit f441a1d

Please sign in to comment.