Beispiel #1
0
 public function testGetActionClassName()
 {
     $className = 'name of class';
     $module = 'module';
     $prefix = 'Controller';
     $actionPath = 'action path';
     $this->nameBuilderMock->expects($this->once())->method('buildClassName')->with([$module, $prefix, $actionPath])->willReturn($className);
     $this->assertEquals($className, $this->model->getActionClassName($module, $actionPath));
 }
Beispiel #2
0
 /**
  * Build controller class name
  *
  * @param string $module
  * @param string $actionPath
  * @return string
  */
 public function getActionClassName($module, $actionPath)
 {
     $prefix = $this->pathPrefix ? 'Controller\\' . $this->pathPrefix : 'Controller';
     return $this->nameBuilder->buildClassName(array($module, $prefix, $actionPath));
 }
Beispiel #3
0
 /**
  * @param array $parts
  * @param string $expected
  *
  * @dataProvider buildClassNameDataProvider
  */
 public function testBuildClassName($parts, $expected)
 {
     $this->assertEquals($expected, $this->nameBuilder->buildClassName($parts));
 }