composer update
This commit is contained in:
@@ -80,9 +80,9 @@ class ParamTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider provideTestTypeHints
|
||||
* @dataProvider provideTestTypes
|
||||
*/
|
||||
public function testTypeHints($typeHint, $expectedType) {
|
||||
public function testTypes($typeHint, $expectedType) {
|
||||
$node = $this->createParamBuilder('test')
|
||||
->setTypeHint($typeHint)
|
||||
->getNode()
|
||||
@@ -100,7 +100,7 @@ class ParamTest extends TestCase
|
||||
$this->assertEquals($expectedType, $type);
|
||||
}
|
||||
|
||||
public function provideTestTypeHints() {
|
||||
public function provideTestTypes() {
|
||||
return [
|
||||
['array', new Node\Identifier('array')],
|
||||
['callable', new Node\Identifier('callable')],
|
||||
@@ -129,20 +129,16 @@ class ParamTest extends TestCase
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException \LogicException
|
||||
* @expectedExceptionMessage Parameter type cannot be void
|
||||
*/
|
||||
public function testVoidTypeError() {
|
||||
$this->createParamBuilder('test')->setTypeHint('void');
|
||||
$this->expectException(\LogicException::class);
|
||||
$this->expectExceptionMessage('Parameter type cannot be void');
|
||||
$this->createParamBuilder('test')->setType('void');
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException \LogicException
|
||||
* @expectedExceptionMessage Type must be a string, or an instance of Name, Identifier or NullableType
|
||||
*/
|
||||
public function testInvalidTypeError() {
|
||||
$this->createParamBuilder('test')->setTypeHint(new \stdClass);
|
||||
$this->expectException(\LogicException::class);
|
||||
$this->expectExceptionMessage('Type must be a string, or an instance of Name, Identifier or NullableType');
|
||||
$this->createParamBuilder('test')->setType(new \stdClass);
|
||||
}
|
||||
|
||||
public function testByRef() {
|
||||
|
Reference in New Issue
Block a user