PHP Class Twitter\Tests\Widgets\Buttons\Follow

Show file Open project: twitter/wordpress

Protected Properties

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

Public Methods

Method Description
setUp ( ) : void Initialize a Follow object before each test
sizeProvider ( ) : array Test sizes
testGetScreenName ( ) : void Test getting screen_name
testHideCount ( ) : void Test setting count option
testHideScreenName ( ) : void Test hiding show screen_name option
testHideScreenNameFromOptionsArray ( string | integer | boolean $test_value, string $message = '' ) : void Test hiding screen_name from an options array
testSetSize ( string $size, boolean $expected_valid, string $message = '' ) : void Test setting button size
testShowCount ( ) : void Test resetting count option
testShowCountFromOptionsArray ( string | integer | boolean $test_value, string $message = '' ) : void Test setting count from an options array
testShowScreenName ( ) : void Test setting show screen_name option
testsetSizeFromOptionsArray ( string $size, boolean $expected_valid, string $message = '' ) : void Test setting size from an options array

Protected Methods

Method Description
hideCountResult ( ) : void Test if hide screen name was successfully set
hideScreenNameResult ( ) : void Test if hide screen name was successfully set
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

hideCountResult() protected method

Test if hide screen name was successfully set
See also: ::testShowCount
Since: 1.0.0
protected hideCountResult ( ) : void
return void

hideScreenNameResult() protected method

Test if hide screen name was successfully set
See also: ::testHideScreenName
Since: 1.0.0
protected hideScreenNameResult ( ) : void
return void

optionsArraySetUp() protected static method

Create a new array with the base required values expected by the ::fromArray constructor
Since: 1.0.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
See also: ::testHideScreenName
Since: 1.0.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 Follow object before each test
Since: 1.0.0
public setUp ( ) : void
return void

sizeProvider() public static method

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

testGetScreenName() public method

The tested function is a getter passthrough to the stored intent
Since: 1.0.0
public testGetScreenName ( ) : void
return void

testHideCount() public method

Test setting count option
Since: 1.0.0
public testHideCount ( ) : void
return void

testHideScreenName() public method

Test hiding show screen_name option
Since: 1.0.0
public testHideScreenName ( ) : void
return void

testHideScreenNameFromOptionsArray() public method

Test hiding screen_name from an options array
Since: 1.0.0
public testHideScreenNameFromOptionsArray ( string | integer | boolean $test_value, string $message = '' ) : void
$test_value string | integer | boolean falsey value
$message string error message
return void

testSetSize() public method

Test setting button size
Since: 1.0.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

testShowCount() public method

Test resetting count option
Since: 1.0.0
public testShowCount ( ) : void
return void

testShowCountFromOptionsArray() public method

Test setting count from an options array
Since: 1.0.0
public testShowCountFromOptionsArray ( string | integer | boolean $test_value, string $message = '' ) : void
$test_value string | integer | boolean truthy value
$message string error message
return void

testShowScreenName() public method

Test setting show screen_name option
Since: 1.0.0
public testShowScreenName ( ) : void
return void

testsetSizeFromOptionsArray() public method

Test setting size from an options array
Since: 1.0.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 property

Follow object initialized to 'twitter' screen_name before each test
Since: 1.0.0
protected $button