Conditions | 1 |
Paths | 1 |
Total Lines | 13 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
43 | public function testGenerateUrlForPackageDescriptorWithGlobalNamespace() |
||
44 | { |
||
45 | // Arrange |
||
46 | $fixture = new PackageDescriptor(); |
||
47 | $PackageDescriptorMock = m::mock('phpDocumentor\Descriptor\PackageDescriptor'); |
||
48 | $PackageDescriptorMock->shouldReceive('getFullyQualifiedStructuralElementName')->andReturn('\\'); |
||
49 | |||
50 | // Act |
||
51 | $result = $fixture($PackageDescriptorMock); |
||
52 | |||
53 | // Assert |
||
54 | $this->assertSame('/packages/default.html', $result); |
||
55 | } |
||
56 | } |
||
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: