Ouzo\Db\WhereClause\ExistsClauseTest::shouldBuildExistsClause PHP Метод

shouldBuildExistsClause() публичный Метод

    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 = ?)');
    }