Conditions | 1 |
Paths | 1 |
Total Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
25 | public function testGenerateUrlForNamespaceDescriptor() |
||
26 | { |
||
27 | // Arrange |
||
28 | $fixture = new NamespaceDescriptor(); |
||
29 | $NamespaceDescriptorMock = m::mock('phpDocumentor\Descriptor\NamespaceDescriptor'); |
||
30 | $NamespaceDescriptorMock->shouldReceive('getFullyQualifiedStructuralElementName')->andReturn('My\\Space'); |
||
|
|||
31 | |||
32 | // Act |
||
33 | $result = $fixture($NamespaceDescriptorMock); |
||
34 | |||
35 | // Assert |
||
36 | $this->assertSame('/namespaces/My.Space.html', $result); |
||
37 | } |
||
38 | |||
57 |
It seems like the method you are trying to call exists only in some of the possible types.
Let’s take a look at an example:
Available Fixes
Add an additional type-check:
Only allow a single type to be passed if the variable comes from a parameter: