Phalcon\Test\Unit\Mvc\Model\CriteriaTest::testShouldExecuteInWhereQueryWithEmptyArray PHP Method

testShouldExecuteInWhereQueryWithEmptyArray() public method

Tests Criteria::inWhere with empty array.
Since: 2016-08-11
Author: Serghei Iakovlev ([email protected])
    public function testShouldExecuteInWhereQueryWithEmptyArray()
    {
        $this->specify('The Criteria::inWhere with empty array does not work as expected', function () {
            $criteria = Users::query()->inWhere(Users::class . '.id', []);
            expect($criteria->getWhere())->equals(Users::class . '.id != ' . Users::class . '.id');
            expect($criteria->execute())->isInstanceOf(Simple::class);
        });
    }