PHP Class Twitter\Tests\Widgets\Buttons\PeriscopeOnAir

Datei anzeigen Open project: twitter/wordpress

Protected Properties

Property Type Description
$button PeriscopeOnAir object initialized to 'twitter' screen_name before each test

Public Methods

Method Description
setUp ( ) : void Initialize a PeriscopeOnAir object before each test
sizeProvider ( ) : array Test sizes
testGetUsername ( ) : void Test getting username
testSetSize ( string $size, boolean $expected_valid, string $message = '' ) : void Test setting button size
testsetSizeFromOptionsArray ( string $size, boolean $expected_valid, string $message = '' ) : void Test setting size from an options array

Protected Methods

Method Description
optionsArraySetUp ( ) : array Create a new array with the base required values expected by the ::fromArray constructor
setSizeResult ( string $size, boolean $expected_valid, string $message = '' ) : void Test if hide screen name was successfully set

Method Details

optionsArraySetUp() protected static method

Create a new array with the base required values expected by the ::fromArray constructor
Since: 1.3.0
protected static optionsArraySetUp ( ) : array
return array options array { @type string key @type string screen_name }

setSizeResult() protected method

Test if hide screen name was successfully set
Since: 1.3.0
protected setSizeResult ( string $size, boolean $expected_valid, string $message = '' ) : void
$size string size
$expected_valid boolean is the passed size expected to pass?
$message string error message
return void

setUp() public method

Initialize a PeriscopeOnAir object before each test
Since: 1.3.0
public setUp ( ) : void
return void

sizeProvider() public static method

Test sizes
Since: 1.3.0
public static sizeProvider ( ) : array
return array sizes to test { @type array size string, expected validity, message }

testGetUsername() public method

Test getting username
Since: 1.3.0
public testGetUsername ( ) : void
return void

testSetSize() public method

Test setting button size
Since: 1.3.0
public testSetSize ( string $size, boolean $expected_valid, string $message = '' ) : void
$size string size
$expected_valid boolean is the passed size expected to pass?
$message string error message
return void

testsetSizeFromOptionsArray() public method

Test setting size from an options array
Since: 1.3.0
public testsetSizeFromOptionsArray ( string $size, boolean $expected_valid, string $message = '' ) : void
$size string size
$expected_valid boolean is the passed size expected to pass?
$message string error message
return void

Property Details

$button protected_oe property

PeriscopeOnAir object initialized to 'twitter' screen_name before each test
Since: 1.3.0
protected $button