1 | <?php |
||
18 | class DataTypeTest extends PHPUnit_Framework_TestCase { |
||
19 | |||
20 | protected function setUp() { |
||
21 | parent::setUp(); |
||
22 | |||
23 | Message::registerTextFunction( function( $key, $languageCode ) { |
||
24 | return implode( '|', func_get_args() ); |
||
25 | } ); |
||
26 | } |
||
27 | |||
28 | /** |
||
29 | * @dataProvider invalidConstructorArgumentsProvider |
||
30 | */ |
||
31 | public function testConstructorThrowsException( $propertyType, $valueType ) { |
||
32 | $this->setExpectedException( 'InvalidArgumentException' ); |
||
33 | new DataType( $propertyType, $valueType ); |
||
34 | } |
||
35 | |||
36 | public function invalidConstructorArgumentsProvider() { |
||
37 | return array( |
||
38 | array( 'propertyType', null ), |
||
39 | array( 'propertyType', false ), |
||
40 | array( null, 'valueType' ), |
||
41 | array( false, 'valueType' ), |
||
42 | ); |
||
43 | } |
||
44 | |||
45 | public function testGetId() { |
||
49 | |||
50 | public function testGetDataValueType() { |
||
54 | |||
55 | public function testGetLabel() { |
||
59 | |||
60 | public function testToArray() { |
||
64 | |||
65 | } |
||
66 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.