elliotchance / concise

✅ Concise is test framework for using plain English and minimal code, built on PHPUnit.
MIT License
45 stars 3 forks source link

Compilation error using with() and single quotes #248

Closed elliotchance closed 9 years ago

elliotchance commented 9 years ago
        $select = $this->mock('\CDbCommand')
            ->disableConstructor()
            ->expect('join')->with('producttags', 'producttags.productid = products.productid')
            ->expect('andWhere')->with("lower(tagname) IN ('foo', bar)")
            ->stub(['getConnection' => DBManager::masterConnection()])
            ->get();
Argument 1 passed to Concise\Mock\ArgumentMatcher::match() must be of the type array, null given, called in /mnt/hgfs/git/kounta/vendor/elliotchance/concise/src/Concise/Mock/ClassCompiler.php(370) : eval()'d code on line 123 and defined

Changing to:

            ->expect('andWhere')->with("lower(tagname) IN (foo, bar)")

Works as expected.

coveralls commented 9 years ago

Coverage Status

Coverage remained the same at 100.0% when pulling b660c47fc7bd361ff371406ca4827a42eb30cd79 on 1.7.2/248-with-single-quotes into f1904406f3fc727285613d28b4e1a64b1a9c1cb1 on release/1.7.2.

scrutinizer-notifier commented 9 years ago

The inspection completed: No new issues