Based on docs and conversations in this repo, it seems we should be able to test constructor logic? I find that it isn't working as expected, consider a class with constructor like so:
class Bar {
public function __construct( Foo $a, Foo $b ){
}
}
And a collaborator based on this class
class Foo {
}
Lastly, this spec:
public function it_can_test_constructor_issues( Foo $a, Foo $b ){
$this->beConstructedWith( $a, $b );
$this->shouldThrow(\RuntimeException::class)->duringInstantiation();
}
PHPSPEC 7.4.0
Based on docs and conversations in this repo, it seems we should be able to test constructor logic? I find that it isn't working as expected, consider a class with constructor like so:
And a collaborator based on this class
Lastly, this spec:
The test should fail, yet passes.