Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
theofidry committed May 15, 2020
1 parent 8f31366 commit cda58df
Showing 1 changed file with 0 additions and 21 deletions.
21 changes: 0 additions & 21 deletions tests/Definition/Object/SimpleObjectTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,25 +85,4 @@ public function testNamedConstructor()
$this->assertEquals(new SimpleObject($reference, $originalInstance), $object);
$this->assertEquals(new SimpleObject($reference, $originalNewInstance), $newObject);
}

/**
* @dataProvider provideInvalidInstances
*/
public function testThrowsAnErrorIfInstanceIsNotAnObject($instance)
{
$this->expectException(\TypeError::class);
$this->expectExceptionMessageMatches('/^Expected instance argument to be an object. Got ".+?" instead\.$/');

new SimpleObject('user0', $instance);
}

public function provideInvalidInstances()
{
return [
'null' => [null],
'string' => ['string value'],
'int' => [10],
'float' => [1.01],
];
}
}

0 comments on commit cda58df

Please sign in to comment.