Ouzo\Db\WhereClause\ExistsClauseTest::shouldBuildExistsClause PHP Method

shouldBuildExistsClause() public method

    public function shouldBuildExistsClause()
    {
        // when
        $result = WhereClause::exists(Product::where(array('name' => 'phone')));
        // then
        $this->assertEquals(array('phone'), $result->getParameters());
        Assert::thatString($result->toSql())->startsWith('EXISTS (SELECT')->endsWith('FROM products WHERE name = ?)');
    }