Skip to content

Commit

Permalink
Convert CellTask test to use bake_compare
Browse files Browse the repository at this point in the history
  • Loading branch information
AD7six committed Nov 24, 2014
1 parent 70676d1 commit bc7381e
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/TestCase/Shell/Task/CellTaskTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,9 @@ public function testBakePlugin() {
);

$result = $this->Task->bake('Example');
$this->assertContains('namespace TestPlugin\View\Cell;', $result);
$this->assertContains('use Cake\View\Cell;', $result);
$this->assertContains('class ExampleCell extends Cell {', $result);

$expected = file_get_contents(CORE_TESTS . '/bake_compare/View/Cell/ExampleCell.php');
$this->assertTextEquals($expected, $result);
}

}
27 changes: 27 additions & 0 deletions tests/bake_compare/View/Cell/ExampleCell.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?php
namespace TestPlugin\View\Cell;

use Cake\View\Cell;

/**
* Example cell
*/
class ExampleCell extends Cell {

/**
* List of valid options that can be passed into this
* cell's constructor.
*
* @var array
*/
protected $_validCellOptions = [];

/**
* Default display method.
*
* @return void
*/
public function display() {
}

}

0 comments on commit bc7381e

Please sign in to comment.