Skip to content

Commit

Permalink
#1252 DDC-3496 - minor test cleanups (avoiding private static method)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ocramius committed Jan 17, 2015
1 parent 60523d1 commit 29007e7
Showing 1 changed file with 6 additions and 27 deletions.
33 changes: 6 additions & 27 deletions tests/Doctrine/Tests/ORM/Mapping/NamingStrategyTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,6 @@ static private function defaultNaming()
return new DefaultNamingStrategy();
}

/**
* @return JoinColumnClassNamingStrategy
*/
static private function joinColumnClassNaming()
{
return new JoinColumnClassNamingStrategy();
}

/**
* @return UnderscoreNamingStrategy
*/
Expand Down Expand Up @@ -171,28 +163,15 @@ static public function dataJoinColumnName()
{
return array(
// DefaultNamingStrategy
array(self::defaultNaming(), 'someColumn_id',
'someColumn', null,
),
array(self::defaultNaming(), 'some_column_id',
'some_column', null,
),
array(self::defaultNaming(), 'someColumn_id', 'someColumn', null),
array(self::defaultNaming(), 'some_column_id', 'some_column', null),

// UnderscoreNamingStrategy
array(self::underscoreNamingLower(), 'some_column_id',
'someColumn', null,
),
array(self::underscoreNamingUpper(), 'SOME_COLUMN_ID',
'someColumn', null,
),

array(self::underscoreNamingLower(), 'some_column_id', 'someColumn', null),
array(self::underscoreNamingUpper(), 'SOME_COLUMN_ID', 'someColumn', null),
// JoinColumnClassNamingStrategy
array(self::joinColumnClassNaming(), 'classname_someColumn_id',
'someColumn', 'Some\ClassName',
),
array(self::joinColumnClassNaming(), 'classname_some_column_id',
'some_column', 'ClassName',
),
array(new JoinColumnClassNamingStrategy(), 'classname_someColumn_id', 'someColumn', 'Some\ClassName'),
array(new JoinColumnClassNamingStrategy(), 'classname_some_column_id', 'some_column', 'ClassName'),
);
}

Expand Down

0 comments on commit 29007e7

Please sign in to comment.