/** * Tests the BaseTableMap::translateFieldName() method */ public function testTranslateFieldNameStatic() { $types = array(TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM); $expecteds = array(TableMap::TYPE_PHPNAME => 'AuthorId', TableMap::TYPE_STUDLYPHPNAME => 'authorId', TableMap::TYPE_COLNAME => 'book.AUTHOR_ID', TableMap::TYPE_FIELDNAME => 'author_id', TableMap::TYPE_NUM => 5); foreach ($types as $fromType) { foreach ($types as $toType) { $name = $expecteds[$fromType]; $expected = $expecteds[$toType]; $result = TableMap::translateFieldNameForClass('\\Propel\\Tests\\Bookstore\\Book', $name, $fromType, $toType); $this->assertEquals($expected, $result); } } }