| Conditions | 1 |
| Paths | 1 |
| Total Lines | 21 |
| Code Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 7 | public function testExecute() |
||
| 8 | { |
||
| 9 | $input = array( |
||
| 10 | 'command' => 'script', |
||
| 11 | 'filename' => __DIR__ . '/_files/test.mr', |
||
| 12 | ); |
||
| 13 | |||
| 14 | // Check pre defined vars |
||
| 15 | $this->assertDisplayRegExp($input, '~^\Qmagento.root: \E/.+\R$~m'); |
||
| 16 | $this->assertDisplayRegExp($input, '~^\Qmagento.edition: \E(Community|Enterprise)\R$~m'); |
||
| 17 | $this->assertDisplayRegExp($input, '~^\Qmagento.version: \E\d\.\d+\.\d+\R$~m'); |
||
| 18 | |||
| 19 | $this->assertDisplayContains($input, 'magerun.version: ' . $this->getApplication()->getVersion()); |
||
|
|
|||
| 20 | |||
| 21 | $this->assertDisplayContains($input, 'code'); |
||
| 22 | $this->assertDisplayContains($input, 'foo.sql'); |
||
| 23 | $this->assertDisplayContains($input, 'BAR: foo.sql.gz'); |
||
| 24 | $this->assertDisplayContains($input, 'Magento Websites'); |
||
| 25 | $this->assertDisplayContains($input, 'web/secure/base_url'); |
||
| 26 | $this->assertDisplayContains($input, 'web/seo/use_rewrites => 1'); |
||
| 27 | } |
||
| 28 | } |
||
| 29 |
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: