| Conditions | 1 |
| Paths | 1 |
| Total Lines | 11 |
| Lines | 11 |
| Ratio | 100 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 39 | View Code Duplication | public function testGetOutputWithoutJs() |
|
| 40 | { |
||
| 41 | $element = $this->buildMock(); |
||
| 42 | |||
| 43 | $element->setId(''); |
||
| 44 | $this->assertNotRegExp('/<script /', $element->getOutput()); |
||
| 45 | |||
| 46 | $element->setId('foo') |
||
| 47 | ->setConfig('sleepTime', 0); |
||
| 48 | $this->assertNotRegExp('/<script /', $element->getOutput()); |
||
| 49 | } |
||
| 50 | } |
||
| 51 |
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: