Inheritance: extends DatabaseTest
示例#1
0
 public function testSearch()
 {
     parent::testSearch();
     $model = $this->getModel('search');
     $model->pro_postcode = 'M1 1AA';
     $data = $model->search()->getData();
     $this->assertCount(1, $data, 'Property::search found many records for "M1 1AA"');
     $model = $this->getModel('search');
     $model->fullAddressString = 'Flat Number 1';
     $data = $model->search()->getData();
     $this->assertCount(1, $data, 'Property::search found many records for "Flat Number 1"');
     //		$model                    = $this->getModel('search');
     //		$model->fullAddressString = 'Flat Number';
     //		$data                     = $model->search()->getData();
     //		$this->assertCount(4, $data, 'Property::search found many records for "Flat Number"');
     $model = $this->getModel('search');
     $model->pro_bedroom = 1;
     $data = $model->search()->getData();
     $this->assertCount(1, $data, 'Property::search found many records for number of bedrooms = 1');
     $model = $this->getModel('search');
     $model->pro_reception = 1;
     $data = $model->search()->getData();
     $this->assertCount(1, $data, 'Property::search found many records for number of reception = 1');
 }
示例#2
0
    }
    /**
     *  Test the __get() method
     *  @todo Implement test__get()
     */
    public function test__get()
    {
        // Remove the following line when you implement this test.
        throw new PHPUnit2_Framework_IncompleteTestError();
    }
    /**
     *  Test the __set() method
     *  @todo Implement test__set()
     */
    public function test__set()
    {
        // Remove the following line when you implement this test.
        throw new PHPUnit2_Framework_IncompleteTestError();
    }
}
// Call ActiveRecordTest::main() if this source file is executed directly.
if (PHPUnit2_MAIN_METHOD == "ActiveRecordTest::main") {
    ActiveRecordTest::main();
}
// -- set Emacs parameters --
// Local variables:
// tab-width: 4
// c-basic-offset: 4
// c-hanging-comment-ender-p: nil
// indent-tabs-mode: nil
// End:
示例#3
0
 protected function setUp()
 {
     User::model()->deleteAllByAttributes(array('use_username' => self::USERNAME));
     parent::setUp();
     // TODO: Change the autogenerated stub
 }