This commit is contained in:
2025-10-13 09:04:00 +00:00
parent 7a3b2960f8
commit 4ee3212899
230 changed files with 40880 additions and 245 deletions
+32
View File
@@ -0,0 +1,32 @@
<?php
namespace Medoo\Tests;
/**
* @coversDefaultClass \Medoo\Medoo
*/
class HasTest extends MedooTestCase
{
/**
* @covers ::has()
* @covers ::selectContext()
* @dataProvider typesProvider
*/
public function testHas($type)
{
$this->setType($type);
$this->database->has("account", [
"user_name" => "foo"
]);
$this->assertQuery([
'default' => <<<EOD
SELECT EXISTS(SELECT 1 FROM "account" WHERE "user_name" = 'foo')
EOD,
'mssql' => <<<EOD
SELECT TOP 1 1 FROM [account] WHERE [user_name] = 'foo'
EOD
], $this->database->queryString);
}
}