상속: extends Bake\Shell\Task\BakeTask
예제 #1
0
 /**
  * Test baking within a plugin.
  *
  * @return void
  */
 public function testBakePlugin()
 {
     $this->_loadTestPlugin('TestBake');
     $path = Plugin::path('TestBake');
     $this->Task->plugin = 'TestBake';
     $this->Task->expects($this->at(0))->method('createFile')->with($this->_normalizePath($path . 'src/Template/Cell/Example/display.ctp'), '');
     $this->Task->expects($this->at(1))->method('createFile')->with($this->_normalizePath($path . 'src/View/Cell/ExampleCell.php'), $this->stringContains('class ExampleCell extends Cell'));
     $result = $this->Task->bake('Example');
     $this->assertSameAsFile(__FUNCTION__ . '.php', $result);
 }
예제 #2
0
 /**
  * Test that mapType returns the correct package names.
  *
  * @dataProvider mapTypeProvider
  * @return void
  */
 public function testMapType($original, $expected)
 {
     $this->assertEquals($expected, $this->Task->mapType($original));
 }