contents() 공개 메소드

public contents ( )
 /**
  * @test
  */
 public function shouldAddEmptyPrimaryKeyEntryWhenNoFoundPrimaryKeyInTable()
 {
     //given
     /** @var Dialect $dialect */
     $dialect = Mock::mock('Ouzo\\Tools\\Model\\Template\\Dialect\\Dialect');
     Mock::when($dialect)->primaryKey()->thenReturn('');
     Mock::when($dialect)->columns()->thenReturn(array());
     $classStubReplacer = new ClassStubPlaceholderReplacer('Customer', new TableInfo($dialect));
     //when
     $classContents = $classStubReplacer->contents();
     //then
     Assert::thatString($classContents)->isNotEqualTo('')->contains('primaryKey');
 }
예제 #2
0
 public function templateContents()
 {
     $tableInfo = new TableInfo($this->adapter);
     $stubReplacer = new ClassStubPlaceholderReplacer($this->getTemplateClassName(), $tableInfo, $this->getClassNamespace(), $this->shortArrays);
     return $stubReplacer->contents();
 }