PHP Class Unicodeveloper\Emoji\Test\EmojiTest

Inheritance: extends PHPUnit_Framework_TestCas\PHPUnit_Framework_TestCase
Show file Open project: unicodeveloper/laravel-emoji

Protected Properties

Property Type Description
$emoji

Public Methods

Method Description
setUp ( )
testAWrongEmojiNameWasCalled ( ) Test that findByAlias gets an unkown emoji name
testAWrongUnicodeValueWasCalled ( ) Test that findByUnicode gets an unknown Unicode value
testFindByAliasReturnsAppropriateUnicodeValue ( ) : boolean Test that the method findByAlias returns the correct unicode value
testFindByNamesReturnsAppropriateUnicodeValue ( ) : boolean Test that the method findByName returns the correct unicode value
testFindByUnicodeReturnsAppropriateEmojiName ( ) : boolean Test that the method findByUnicode returns the correct emoji name
testGetEmojis ( ) : boolean Test the private getEmojis method
testNonexistentMethod ( ) Test that a method that does not exist throws the right Exception
testfindByAliasDoesntHaveAnArgument ( ) Test that findByAlias doesn't receive any argument
testfindByNameDoesntHaveAnArgument ( ) Test that findByName doesn't receive any argument

Private Methods

Method Description
getEmojis ( ) : array Get the emojis from emoji.php
invokeMethod ( &$object, string $methodName, array $parameters = [] ) : mixed Call protected/private method of a class.

Method Details

setUp() public method

public setUp ( )

testAWrongEmojiNameWasCalled() public method

Test that findByAlias gets an unkown emoji name

testAWrongUnicodeValueWasCalled() public method

Test that findByUnicode gets an unknown Unicode value

testFindByAliasReturnsAppropriateUnicodeValue() public method

Test that the method findByAlias returns the correct unicode value

testFindByNamesReturnsAppropriateUnicodeValue() public method

Test that the method findByName returns the correct unicode value

testFindByUnicodeReturnsAppropriateEmojiName() public method

Test that the method findByUnicode returns the correct emoji name

testGetEmojis() public method

Test the private getEmojis method
public testGetEmojis ( ) : boolean
return boolean

testNonexistentMethod() public method

Test that a method that does not exist throws the right Exception

testfindByAliasDoesntHaveAnArgument() public method

Test that findByAlias doesn't receive any argument

testfindByNameDoesntHaveAnArgument() public method

Test that findByName doesn't receive any argument

Property Details

$emoji protected property

protected $emoji