Пример #1
0
 /**
  * @expectedException \ORM\Exceptions\FieldDoesNotExistException
  */
 public function testDescribeUnknownField()
 {
     $factory = PDOFactory::GetFactory();
     $factory->describeField('cars', 'idontexist');
 }
Пример #2
0
<?php

namespace FlexibleORMTests;

use FlexibleORMTests\Mock\CachedCar;
use FlexibleORMTests\Mock\CachedElephant;
use FlexibleORMTests\Mock\CachedOwner;
use ORM\PDOFactory;
use ORM\Utilities\Cache\APCCache;
use Owner;
require_once 'ORMTest.php';
PDOFactory::GetFactory()->startProfiling();
/**
 * Test class for ORM_Model
 *
 * @note This tests that CachedORMModelTest behaves exactly as ORM_Model and that
 *      it caches objects correctly
 */
class CachedORMModelTest extends ORMTest
{
    protected function tearDown()
    {
        $freds = Owner::FindAllByName('Fred');
        $freds->delete();
    }
    public function testTableName()
    {
        $this->assertEquals('cars', CachedCar::TableName());
    }
    public function testFind()
    {