CC-2166: Packaging Improvements. Moved the Zend app into airtime_mvc. It is now installed to /var/www/airtime. Storage is now set to /srv/airtime/stor. Utils are now installed to /usr/lib/airtime/utils/. Added install/airtime-dircheck.php as a simple test to see if everything is install/uninstalled correctly.
This commit is contained in:
parent
514777e8d2
commit
b11cbd8159
4546 changed files with 138 additions and 51 deletions
|
@ -0,0 +1,70 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the Propel package.
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*
|
||||
* @license MIT License
|
||||
*/
|
||||
|
||||
require_once 'tools/helpers/bookstore/BookstoreTestBase.php';
|
||||
|
||||
/**
|
||||
* Test class for RelatedMap::getSymmetricalRelation.
|
||||
*
|
||||
* @author François Zaninotto
|
||||
* @version $Id: GeneratedRelationMapTest.php 1347 2009-12-03 21:06:36Z francois $
|
||||
* @package runtime.map
|
||||
*/
|
||||
class RelatedMapSymmetricalTest extends BookstoreTestBase
|
||||
{
|
||||
protected $databaseMap;
|
||||
|
||||
protected function setUp()
|
||||
{
|
||||
parent::setUp();
|
||||
$this->databaseMap = Propel::getDatabaseMap('bookstore');
|
||||
}
|
||||
|
||||
public function testOneToMany()
|
||||
{
|
||||
$bookTable = $this->databaseMap->getTableByPhpName('Book');
|
||||
$bookToAuthor = $bookTable->getRelation('Author');
|
||||
$authorTable = $this->databaseMap->getTableByPhpName('Author');
|
||||
$authorToBook = $authorTable->getRelation('Book');
|
||||
$this->assertEquals($authorToBook, $bookToAuthor->getSymmetricalRelation());
|
||||
$this->assertEquals($bookToAuthor, $authorToBook->getSymmetricalRelation());
|
||||
}
|
||||
|
||||
public function testOneToOne()
|
||||
{
|
||||
$accountTable = $this->databaseMap->getTableByPhpName('BookstoreEmployeeAccount');
|
||||
$accountToEmployee = $accountTable->getRelation('BookstoreEmployee');
|
||||
$employeeTable = $this->databaseMap->getTableByPhpName('BookstoreEmployee');
|
||||
$employeeToAccount = $employeeTable->getRelation('BookstoreEmployeeAccount');
|
||||
$this->assertEquals($accountToEmployee, $employeeToAccount->getSymmetricalRelation());
|
||||
$this->assertEquals($employeeToAccount, $accountToEmployee->getSymmetricalRelation());
|
||||
}
|
||||
|
||||
public function testSeveralRelationsOnSameTable()
|
||||
{
|
||||
$authorTable = $this->databaseMap->getTableByPhpName('Author');
|
||||
$authorToEssay = $authorTable->getRelation('EssayRelatedByFirstAuthor');
|
||||
$essayTable = $this->databaseMap->getTableByPhpName('Essay');
|
||||
$essayToAuthor = $essayTable->getRelation('AuthorRelatedByFirstAuthor');
|
||||
$this->assertEquals($authorToEssay, $essayToAuthor->getSymmetricalRelation());
|
||||
$this->assertEquals($essayToAuthor, $authorToEssay->getSymmetricalRelation());
|
||||
}
|
||||
|
||||
public function testCompositeForeignKey()
|
||||
{
|
||||
$favoriteTable = $this->databaseMap->getTableByPhpName('ReaderFavorite');
|
||||
$favoriteToOpinion = $favoriteTable->getRelation('BookOpinion');
|
||||
$opinionTable = $this->databaseMap->getTableByPhpName('BookOpinion');
|
||||
$opinionToFavorite = $opinionTable->getRelation('ReaderFavorite');
|
||||
$this->assertEquals($favoriteToOpinion, $opinionToFavorite->getSymmetricalRelation());
|
||||
$this->assertEquals($opinionToFavorite, $favoriteToOpinion->getSymmetricalRelation());
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue