Ouzo\Tools\Controller\Template\ControllerGenerator::templateContents PHP 메소드

templateContents() 공개 메소드

public templateContents ( )
    public function templateContents()
    {
        $classStubPlaceholderReplacer = new ControllerClassStubPlaceholderReplacer($this);
        return $classStubPlaceholderReplacer->content();
    }

Usage Example

 /**
  * @test
  */
 public function shouldReplaceClassNameAndNamespace()
 {
     //given
     $generator = new ControllerGenerator('users');
     //when
     $templateContents = $generator->templateContents();
     //then
     Assert::thatString($templateContents)->contains('namespace \\Application\\Controller;')->contains('class UsersController extends Controller');
 }