Overview

Packages

  • application
    • commands
    • components
      • actions
      • filters
      • leftWidget
      • permissions
      • sortableWidget
      • util
      • webupdater
      • x2flow
        • actions
        • triggers
      • X2GridView
      • X2Settings
    • controllers
    • models
      • embedded
    • modules
      • accounts
        • controllers
        • models
      • actions
        • controllers
        • models
      • calendar
        • controllers
        • models
      • charts
        • models
      • contacts
        • controllers
        • models
      • docs
        • components
        • controllers
        • models
      • groups
        • controllers
        • models
      • marketing
        • components
        • controllers
        • models
      • media
        • controllers
        • models
      • mobile
        • components
      • opportunities
        • controllers
        • models
      • products
        • controllers
        • models
      • quotes
        • controllers
        • models
      • services
        • controllers
        • models
      • template
        • models
      • users
        • controllers
        • models
      • workflow
        • controllers
        • models
      • x2Leads
        • controllers
        • models
  • Net
  • None
  • PHP
  • system
    • base
    • caching
      • dependencies
    • collections
    • console
    • db
      • ar
      • schema
        • cubrid
        • mssql
        • mysql
        • oci
        • pgsql
        • sqlite
    • i18n
      • gettext
    • logging
    • test
    • utils
    • validators
    • web
      • actions
      • auth
      • filters
      • form
      • helpers
      • renderers
      • services
      • widgets
        • captcha
        • pagers
  • Text
    • Highlighter
  • zii
    • behaviors
    • widgets
      • grid
      • jui

Classes

  • CDbFixtureManager
  • CDbTestCase
  • CTestCase
  • CWebTestCase
  • Overview
  • Package
  • Class
  • Tree

Class CWebTestCase

CWebTestCase is the base class for Web-based functional test case classes.

It extends PHPUnit_Extensions_SeleniumTestCase and provides the database fixture management feature like CDbTestCase.

PHPUnit_Extensions_SeleniumTestCase
Extended by CWebTestCase
Abstract
Package: system\test
Copyright: 2008-2013 Yii Software LLC
License: http://www.yiiframework.com/license/
Author: Qiang Xue <qiang.xue@gmail.com>
Since: 1.1
Located at x2engine/framework/test/CWebTestCase.php
Methods summary
public mixed
# __get( string $name )

PHP magic method. This method is overridden so that named fixture data can be accessed like a normal property.

PHP magic method. This method is overridden so that named fixture data can be accessed like a normal property.

Parameters

$name
string
$name the property name

Returns

mixed
the property value

Throws

Exception
if unknown property is used
public mixed
# __call( string $name, string $params )

PHP magic method. This method is overridden so that named fixture ActiveRecord instances can be accessed in terms of a method call.

PHP magic method. This method is overridden so that named fixture ActiveRecord instances can be accessed in terms of a method call.

Parameters

$name
string
$name method name
$params
string
$params method parameters

Returns

mixed
the property value
public CDbFixtureManager
# getFixtureManager( )

Returns

CDbFixtureManager
the database fixture manager
public array
# getFixtureData( string $name )

Parameters

$name
string
$name the fixture name (the key value in CWebTestCase::$fixtures).

Returns

array
the named fixture data
public CActiveRecord
# getFixtureRecord( string $name, string $alias )

Parameters

$name
string
$name the fixture name (the key value in CWebTestCase::$fixtures).
$alias
string
$alias the alias of the fixture data row

Returns

CActiveRecord
the ActiveRecord instance corresponding to the specified alias in the named fixture. False is returned if there is no such fixture or the record cannot be found.
protected
# setUp( )

Sets up the fixture before executing a test method. If you override this method, make sure the parent implementation is invoked. Otherwise, the database fixtures will not be managed properly.

Sets up the fixture before executing a test method. If you override this method, make sure the parent implementation is invoked. Otherwise, the database fixtures will not be managed properly.

Properties summary
protected array $fixtures false
#

a list of fixtures that should be loaded before each test method executes. The array keys are fixture names, and the array values are either AR class names or table names. If table names, they must begin with a colon character (e.g. 'Post' means an AR class, while ':Post' means a table name). Defaults to false, meaning fixtures will not be used at all.

a list of fixtures that should be loaded before each test method executes. The array keys are fixture names, and the array values are either AR class names or table names. If table names, they must begin with a colon character (e.g. 'Post' means an AR class, while ':Post' means a table name). Defaults to false, meaning fixtures will not be used at all.

Magic properties summary
public CDbFixtureManager $fixtureManager
#

The database fixture manager.

The database fixture manager.

API documentation generated by ApiGen 2.8.0