Ouzo\Tools\Controller\Template\ControllerGenerator::templateContents PHP Method

templateContents() public method

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');
 }